Siebel Reports Administration Guide > Smart Reports > About Thermometers Used in Smart Reports >

Obtaining the Data Value for Use with Smart Reports


The Past Revenue thermometer example (in the Acsum.rod [Account Summary] report) uses a total of past revenue for opportunities for the current account as its data value. The components and logic for deriving this data value are described in this topic.

The components for deriving the data value occur in two areas in the report structure:

  • An array of opportunity records is loaded in one of the data loading report sections for later access.
  • A dashboard report section totals the relevant opportunity records and passes the total in the DataValue parameter to the thermometer component.

The components for loading the opportunity record array are in the rptCollectOpportunitiesAndThreats report section, near the beginning of secMain, as shown in Figure 23.

Figure 23. Components for Loading the Opportunity Array
Click for full size image

This report section loads two global arrays (attached as variables to the top-level report design object), PastOpportunityArray and PipelineOpportunityArray. These both hold opportunity records for the current account, but meet different criteria. The former of these is used later in the report logic to derive the data value for the thermometer of interest (the latter is used for another thermometer, thermoPipeline).

The datastream that supplies this report section, ssOpportunityQuery_1, is a subreport datastream in the data supply library file for the report.

The processing logic for the report section is in the Start and Fetch methods for the filter component, ftrCollectOpportunities. The Start method empties the two arrays. The Fetch method sorts records from the opportunity datastream that match specified criteria into the two arrays. Records for PastOpportunityArray are those that have a Rep% (percentage) of 100; those for PipelineOpportunityArray have a Rep% lower than 100 and a close date later than the date the report is run.

The components and logic for determining the past revenue for the current account, based on the opportunity records stored in memory, are in the rptPastRevenueThermometer report section in the dashboard parallel section (parDashboard). This report section and its child components are illustrated in Figure 24.

Figure 24. Thermometer Report Section Components
Click for full size image

The components in Figure 24 are as follows:

  • Report section. The thermometer report section, rptPastRevenueThermometer, contains datastream and data row components for extracting a past revenue total for the account from opportunity records in memory. It also contains a container frame, frmPastRevenue, that holds the thermometer component, thermoPastRevenue. The thermometer component generates the thermometer based on the values passed to it in property settings and parameter variables.
  • Data row. The data row component, rowPastRevenueThermometer, holds one variable: PastRevenue. A single row containing this value is all that the data row and datastream need to generate for the thermometer.
  • Datastream. The Start and Fetch methods in the datastream component process the opportunity records in the PastOpportunityArray memory structure. An iterator, PastRevenueIterator, is set up for this array, and the ssFunctionalRevenue value in each opportunity record is accumulated in the PastRevenue variable. It is the value of this variable that the datastream provides to the thermometer as the DataValue parameter.
  • Content Frame. The frmPastRevenue frame is a standard content frame, allowing the thermometer component to be included in the report structure. It serves no other purpose.
  • Thermometer. The thermoPastRevenue component is a thermometer, derived from the ssThermometer library component in the ssSmart.rol library. The Color, Label, and TriggerLabel properties are set in thermoPastRevenue to configure these features of the thermometer. The OnRow method (in code located both in thermoPastRevenue and in its parent, ssThermometer) retrieves the one row generated by the datastream and passes the PastRevenue value as the method's input parameter, DataValue. The other input parameters, MinimumValue, MaximumValue, and TriggerDataValue, are obtained from previous logic, as described in Obtaining the Minimum, Maximum, and Trigger Values for Smart Reports.

    An additional role of the OnRow method is to compare DataValue with TriggerDataValue to obtain a TRUE or FALSE value for PastRevenueThermometerAboveTarget. This Boolean variable and corresponding ones for the other thermometers are collectively used to determine the direction of the order-of-merit indicator arrow at the top of the account's page.

Siebel Reports Administration Guide Copyright © 2009, Oracle and/or its affiliates. All rights reserved. Legal Notices.