<summary>
XML tagThe <summary>
tag defines
a summary column in
the data model of the report definition. Summary columns are used to perform
some mathematical function on the data values of another column. If you want
to perform a function that is not one of the standard summary functions, then
you can use the <formula>
tag to create a formula column that uses PL/SQL to perform more complex calculations.
<summary
source="src_col_name"
[function="sum | average | minimum | maximum
| count | first | last | pctTotal
| stddeviation |variance"]
[compute="compute_group_name"]
[reset="reset_group_name"]
[productOrder="po_group_name"]
[nullval="value_if_null"]
/>
Parameters /Options |
Descriptions |
|
Is the name of the column whose values are summarized. |
function
(Default = |
Is the mathematical operation to be applied to produce the summary values:
|
compute_group_name
(Break group default = the parent group of the summary column's group) (Matrix report default = the matrix group) |
Is the group over which a % of Total summary column is computed. You can also set this attribute to |
reset_group_name
(Break group default= the parent group of the summary column's group (Matrix report default = the highest frequency group of the productOrder) |
Is the group at which the summary column value resets to zero (if Function
is Count), null (if Function is not Count), or nullval (if the summary
has one). You can also set this attribute to page or report if you want to compute percentages over the total values on each page or over the entire report. |
po_group_name
(Matrix report default is either:
|
Is the order in which groups are evaluated
in the cross product for a summary. |
|
Is a value to be substituted for any null values of the column. For example,
if you set this value to |
The following is an example of some summaries for a data model that contains two queries. The first three summaries are for a tabular layout and the last six are for a matrix break report. Because only the name, source column, and function are specified, the defaulting algorithm will place the columns in the appropriate groups based on where we place their associated fields in the layout.
<data>
<dataSource name="Q_1">
<select>
SELECT ALL VIDEO_CATEGORY_BY_QTR.QUARTER,
VIDEO_CATEGORY_BY_QTR.SALES_REGION,
VIDEO_CATEGORY_BY_QTR.STATE, VIDEO_CATEGORY_BY_QTR.CITY,
VIDEO_CATEGORY_BY_QTR.PRODUCT_CATEGORY,
VIDEO_CATEGORY_BY_QTR.TOTAL_SALES,
VIDEO_CATEGORY_BY_QTR.TOTAL_COST,
VIDEO_CATEGORY_BY_QTR.TOTAL_PROFIT
FROM SCOTT.VIDEO_CATEGORY_BY_QTR
WHERE VIDEO_CATEGORY_BY_QTR.SALES_REGION='West'
</select>
</dataSource>
<dataSource name="Q_2">
<select>
SELECT ALL VIDEO_CATEGORY_BY_QTR.QUARTER, VIDEO_CATEGORY_BY_QTR.CITY,
VIDEO_CATEGORY_BY_QTR.PRODUCT_CATEGORY,
VIDEO_CATEGORY_BY_QTR.TOTAL_PROFIT,
VIDEO_CATEGORY_BY_QTR.TOTAL_SALES,
VIDEO_CATEGORY_BY_QTR.TOTAL_COST
FROM SCOTT.VIDEO_CATEGORY_BY_QTR
WHERE VIDEO_CATEGORY_BY_QTR.SALES_REGION='West'
</select>
</dataSource>
<summary name="SumTOTAL_SALESPerCITY1"
source="total_sales1"/>
<summary name="SumTOTAL_COSTPerCITY1"
source="total_cost1"/>
<summary name="SumTOTAL_PROFITPerCITY1"
source="total_profit1"/>
<summary name="SumTOTAL_SALESPerQUARTER"
source="total_sales"/>
<summary name="SumTOTAL_COSTPerQUARTER"
source="total_cost"/>
<summary name="SumTOTAL_PROFITPerQUARTER"
source="total_profit"/>
<summary name="SumTOTAL_SALESPerCITY"
source="total_sales"/>
<summary name="SumTOTAL_COSTPerCITY"
source="total_cost"/>
<summary name="SumTOTAL_PROFITPerCITY"
source="total_profit"/>
<formula name="Profit_Margin"
source="FormulaProfitMargin"
datatype="number" width="9"/>
</data>
Copyright © 1984, 2005, Oracle. All rights reserved.