<matrix>
XML tagThe <matrix>
tag delimits
a matrix style within a section of the report’s layout. If you use the <matrix>
tag, then you must also nest <matrixRow>
,
<matrixCol>
,
and <matrixCell>
tags to identify the parts of the matrix as well as <field>
tags to list the fields you want to include in the matrix layout.
A <group>
tag can also be used in conjunction with <matrix>
tags to create a matrix with group style.
<matrix name="style_name">
[<group>
master_group_content
</group>]
<matrixCol>
matrix_column content
</matrixCol>
<matrixRow>
matrix_row_content
</matrixRow>
<matrixCell>
matrix_cell_content
</matrixCell>
</matrix>
The following example shows a segment of an XML report definition that defines a matrix with group layout:
<matrix name="M_video_sales" template="corp10.tdf">
<group>
<field name="f_quarter" source="quarter"
label="Quarter:"
font="Arial" fontSize="8"
formatTrigger="F_quarterFormatTrigger">
<labelAttribute font="Arial" fontSize="8"
fontStyle="bold" textColor="black"/>
</field>
<field name="f_SumTOTAL_SALESPerQUARTER"
source="SumTOTAL_SALESPerQUARTER"
label="Qtrly: Sales: " font="Arial"
fontSize="8" fontStyle="bold"
formatMask="LNNNGNNNGNNNGNN0D00">
<labelAttribute font="Arial" fontSize="8"
fontStyle="bold" textColor="black"/>
</field>
<field name="f_SumTOTAL_COSTPerQUARTER"
source="SumTOTAL_COSTPerQUARTER"
label="Costs: " font="Arial" fontSize="8"
fontStyle="bold"
formatMask="LNNNGNNNGNNNGNN0D00">
<labelAttribute font="Arial" fontSize="8"
fontStyle="bold" textColor="black"/>
</field>
<field name="f_SumTOTAL_PROFITPerQUARTER"
source="SumTOTAL_PROFITPerQUARTER"
label="Profits: " font="Arial"
fontSize="8" fontStyle="bold"
formatMask="LNNNGNNNGNNNGNN0D00">
<labelAttribute font="Arial" fontSize="8"
fontStyle="bold" textColor="black"/>
</field>
</group>
<group>
<field name="f_state" source="state"
label="State:"
font="Arial" fontSize="8">
<labelAttribute font="Arial" fontSize="8"
fontStyle="bold" textColor="black"/>
</field>
</group>
<matrixCol name="g_city">
<field name="f_city" source="city"
label="City: "
font="Arial" fontSize="8" textColor="yellow"
formatTrigger="F_cityFormatTrigger"/>
<field name="f_SumTOTAL_SALESPerCITY"
source="SumTOTAL_SALESPerCITY"
label="Sales: " font="Arial" fontSize="8"
fontStyle="bold"
textColor="yellow" formatMask="LNNNGNNNGNNNGNN0D00">
<labelAttribute font="Arial" fontSize="8"
fontStyle="bold" textColor="yellow"/>
</field>
<field name="f_SumTOTAL_COSTPerCITY"
source="SumTOTAL_COSTPerCITY"
label="Sales: " font="Arial" fontSize="8"
fontStyle="bold"
textColor="yellow" formatMask="LNNNGNNNGNNNGNN0D00">
<labelAttribute font="Arial" fontSize="8"
fontStyle="bold" textColor="yellow"/>
</field>
<field name="f_SumTOTAL_PROFITPerCITY"
source="SumTOTAL_PROFITPerCITY"
label="Sales: " font="Arial" fontSize="8"
fontStyle="bold"
textColor="yellow" formatMask="LNNNGNNNGNNNGNN0D00">
<labelAttribute font="Arial" fontSize="8"
fontStyle="bold" textColor="yellow"/>
</field>
</matrixCol>
<matrixRow name="g_product_category">
<field name="f_product_category" source="product_category"
label="Product Category" font="Arial"
fontSize="8"/>
</matrixRow>
<matrixCell name="g_total_sales">
<field name="f_total_sales" source="total_sales"
label="Total Sales"
font="Arial" fontSize="8" lineColor="noLine"
formatMask="LNNNGNNNGNNNGNN0D00"/>
<field name="f_total_cost" source="total_cost"
label="Total Cost"
font="Arial" fontSize="8" lineColor="noLine"
formatMask="LNNNGNNNGNNNGNN0D00"/>
<field name="f_total_profit" source="total_profit"
label="Total Profit"
font="Arial" fontSize="8" lineColor="noLine"
formatMask="LNNNGNNNGNNNGNN0D00"/>
</matrixCell>
</matrix>
Copyright © 1984, 2005, Oracle. All rights reserved.