![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
You must provide a source to obtain a value for each derived report field. The value can be derived from a function, a rule, or another report field. Each derived field must have this source information individually designated. In the example report MONTHLY_EXPENSE, the report field DATE is derived from the $TRXDATE tool. Refer to TIBCO Object Service Broker Shareable Tools for more information on this tool.
• If the value for the field is derived from a report function, select the function and type your specifications into the appropriate argument fields. You can select only one function per derived field.
• If the value for the field is derived from a rule or another report field, type the information in the Source rule/field/text field.
• Deriving fields from a report function is available only through the Report Definer. If you want to perform this functionality on a report you created with the Report Generator, you must first save the report in the Report Definer and then access the LITERAL/DERIVED Field Definitions segment of the Expand screen in the Report Table Painter.To specify more than one report field for the OF Field or BY Field arguments, type in the fields separated by blanks.
3. To specify selection criteria for the occurrences to be used by the report function, type in this criteria to the WHERE argument.
The field on which the report function is to be performed. For the report function COUNT, more than one field can be specified. The field or fields by which the function is calculated. BY field values partition the report table occurrences into sets. The report function value stored on any given occurrence is the one that was calculated using the set of occurrences that contains the current value of the BY fields. The selection criteria used to further limit the set of occurrences available for the report function. The selection criteria entered on the Control Field screen are not applied to the occurrences used by the report function.
Returns the total of the values of the OF Field for the selected occurrences. Returns the count of the unique OF Field values for the selected occurrences. If no field name is specified in the OF Field, Count returns the total number of occurrences based on the WHERE clause. Returns the mean value of the OF Field for the selected occurrences. Returns the maximum value of the OF Field for the selected occurrences. Returns the minimum value of the OF Field for the selected occurrences. Returns the standard deviation of the values of the OF Field for the selected occurrences. Standard deviation is the square root of the variance. Returns the variance of the values of the OF Field for the selected occurrences. The formula used to derive the variance is as follows:xi is an individual value of report field xn is the count of selected values of xx is the mean of the selected values of x
You enter these functions in the Source rule/field/text field. This field also displays the actual text associated with a literal field. To display this information, position your cursor on the literal text and press PF15. The information that appears cannot be modified.
To derive a value based on a field or a rule, type the name of the field or the name of the rule in the Source rule/field/text field, for example, $TRXDATE.Report fields that are referenced in a rule must be passed in as arguments to the rule in the Source rule/field/text field of the screen.
A report SHOWITEMS contains a report table RPTITEMS that includes four fields: ITEM#, PRICE, TAX, and TOTAL. Sample output for the report is shown here:
In the report table RPTITEMS, the value of the TOTAL field is derived from the TOTCOST rule that takes the PRICE and TAX fields as arguments, as in the following:
When the rule executes, it takes the values passed from the PRICE and TAX fields, calculates a new value, and returns it to the TOTAL field.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |