Define parent and child data bands in a paginated report

Technologies > Business Process Owner Views > Paginated Reports > Report with One Parent and One Child Data Band

The following report, Rooms by Floor, uses the Floors table as the parent data band and the Rooms table as the child data band. Declare a separate data source for the parent and child data bands. Note that the parent data band panel's role is parent :

<dataSource id="ds_abExRmxflRpt_owner">
<table name="fl" role="main"/>
<field table="fl" name="bl_id"/>
<field table="fl" name="fl_id"/>
</dataSource>

<panel type="paginatedReport" role="parent" dataSource="ds_abExRmxflRpt_owner"... >
<title translatable="true">Floors</title>
<field table="fl" name="bl_id" restrictionParameterName="flBlId"/>
<field table="fl" name="fl_id" restrictionParameterName="flFlId"/>
</panel>

The restrictionParameterName attribute instructs the report routine to use that value in the parent data source to restrict the dependent data sources. Typically, you would add a restrictionParameterName attribute to all fields of the grouping of the parent data source. That is, you would add restrictionParameterName to each primary key field or to each field that has groupBy=”true” .

The child data band panel's role is data :

<dataSource id="ds_abExRmxflRpt_data">
<table name="rm" role="main"/>
<field table="rm" name="bl_id"/>
<field table="rm" name="fl_id"/>
<field table="rm" name="rm_id"/>
<field table="rm" name="name"/>
...
<parameter name="flBlId" dataType="verbatim" value=""/>
<parameter name="flFlId" dataType="verbatim" value=""/>
<restriction type="parsed">
<clause relop="AND" op="=" table="rm" name="bl_id" value="${parameters['flBlId']}" />
<clause relop="AND" op="=" table="rm" name="fl_id" value="${parameters['flFlId']}" />
</restriction>
</dataSource>

<panel type="paginatedReport" role="data" dataSource="ds_abExRmxflRpt_data" ... >
<title translatable="true">Rooms</title>
</panel>

File: archibus/schema/ab-products/solutions/parts/pagereports/ab-ex-rmxfl-rpt.axvw

The data source defined for the child data band contains a parameterized restriction ( Use parameterized restrictions ). The parameter(s) is declared in the data source and then used in the data source restriction clause. The restriction parameter(s) is the same as that defined in the parent panel.

Load report: http://localhost:8080/archibus/pagereports/ab-ex-rmxfl-rpt.axvw