Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Add Subtotal to the BIRT report before page break(Add Subtotal to the BIRT report before page break)
Add Subtotal to the BIRT report before page break [message #671256] Tue, 17 May 2011 10:00 Go to next message
shine_1611 is currently offline shine_1611Friend
Messages: 20
Registered: April 2011
Location: Mumbai
Junior Member
Hello All,

QUERY 1
____________________________________________________________ ___________
My report has multiple pages and requirement is to show the Subtotal on the page based on the Row count. As the number of row are not fix as the size of of the report content varies.
I need some way by which I could add SUBTOTAL at the end of the Page and then page break happens. later on when it reaches End of file at that time I want to add grand total and it should not break the second last page after SUBTOTAL immediately if it can accommodate the Grand total row as well.

Currently to achieve this I have used row.__rownum approach I have grouped page by rownum and i have set a fix (hardcoded) interval it works but it is not good solution because when page content is long at that time hardcoded interval will show the subtotal on next page somewhere in the middle.

Please tell me some way by which I could achieve this.
____________________________________________________________ ___________
QUERY 2
____________________________________________________________ ___________
Another thing which I want to achieve is adding filename to the footer. Whenever user download the Pdf/excel page footer should have name of the file e.g
shippingAddress.pdf etc

can you please guide how can i dynamically add the file name to the footer? is it possible using Birt api? as I am using birt api to export the report so it would be good if i can get some help on that side.


Thanks
Shivani
Re: Add Subtotal to the BIRT report before page break [message #671361 is a reply to message #671256] Tue, 17 May 2011 15:12 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

If you use the frameset mapping or if using the api you do a run task
and then a render task you can use page scripts to calculate per page
totals. Look at the attached example which calculates qty sums for
every page. There is also a variable in the page script to get the
report name for the footer. One other (onrender script) changes this
variable at render time to add the appropriate output format. BTW 2.6.2
fixed issues with using a pagebreakinterval of 0 and pagescripts.

Jason

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.22"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.6.1.v20100902 Build &lt;2.6.1.v20100915-1750></property>
<property name="units">in</property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<property name="imageDPI">96</property>
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
id="7">
<property
name="odaDriverClass">org.eclipse.birt.report.data.oda.sampledb.Driver </property>
<property name="odaURL">jdbc:classicmodels:sampledb</property>
<property name="odaUser">ClassicModels</property>
<property name="OdaConnProfileName"></property>
</oda-data-source>
</data-sources>
<data-sets>
<oda-data-set
extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
name="Data Set" id="8">
<list-property name="columnHints">
<structure>
<property name="columnName">ORDERNUMBER</property>
<text-property
name="displayName">ORDERNUMBER</text-property>
</structure>
<structure>
<property name="columnName">PRODUCTCODE</property>
<text-property
name="displayName">PRODUCTCODE</text-property>
</structure>
<structure>
<property name="columnName">QUANTITYORDERED</property>
<text-property
name="displayName">QUANTITYORDERED</text-property>
</structure>
<structure>
<property name="columnName">PRICEEACH</property>
<text-property
name="displayName">PRICEEACH</text-property>
</structure>
<structure>
<property name="columnName">ORDERLINENUMBER</property>
<text-property
name="displayName">ORDERLINENUMBER</text-property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="dataType">float</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="nativeName">ORDERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="nativeName">PRODUCTCODE</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="nativeName">QUANTITYORDERED</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="nativeName">PRICEEACH</property>
<property name="dataType">float</property>
<property name="nativeDataType">8</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="nativeName">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">5</property>
</structure>
</list-property>
<xml-property name="queryText"><![CDATA[select *
from orderdetails]]></xml-property>
<xml-property name="designerValues"><![CDATA[<?xml
version="1.0" encoding="UTF-8"?>
<model:DesignValues
xmlns:design="http://www.eclipse.org/datatools/connectivity/oda/design"
xmlns:model="http://www.eclipse.org/birt/report/model/adapter/odaModel">
<Version>1.0</Version>
<design:ResultSets derivedMetaData="true">
<design:resultSetDefinitions>
<design:resultSetColumns>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERNUMBER</design:name>
<design:position>1</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERNUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERNUMBER</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>PRODUCTCODE</design:name>
<design:position>2</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>PRODUCTCODE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>PRODUCTCODE</design:label>
<design:formattingHints>
<design:displaySize>15</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>QUANTITYORDERED</design:name>
<design:position>3</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>QUANTITYORDERED</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>QUANTITYORDERED</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>PRICEEACH</design:name>
<design:position>4</design:position>
<design:nativeDataTypeCode>8</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>PRICEEACH</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>PRICEEACH</design:label>
<design:formattingHints>
<design:displaySize>22</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERLINENUMBER</design:name>
<design:position>5</design:position>
<design:nativeDataTypeCode>5</design:nativeDataTypeCode>
<design:precision>5</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERLINENUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERLINENUMBER</design:label>
<design:formattingHints>
<design:displaySize>6</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
</design:resultSetColumns>
<design:criteria/>
</design:resultSetDefinitions>
</design:ResultSets>
</model:DesignValues>]]></xml-property>
</oda-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">sans-serif</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab-cell" id="5">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab" id="6">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<property name="topMargin">1in</property>
<method name="onPageEnd"><![CDATA[var qtys =
this.getInstancesByElementName("qtyelement");
var tmp=0;
if( qtys != null ){
for( var i=0; i< qtys.length; i++ ){
//Instance of DataItemInstance
var qty = qtys[i];
tmp+=parseInt(qty.getValue());
}

}
reportContext.setPageVariable("pageqty",tmp);
var loc = reportContext.getReportRunnable().getReportName();
loc = loc.substring( 0, (loc.length() - 9 ) ); //format is added in the
onrender script on the master page
reportContext.setPageVariable("ReportLocation", loc);]]></method>
<page-header>
<auto-text id="44">
<property name="backgroundColor">#FF8080</property>
<property name="type">page-variable</property>
<property name="pageVariable">pageqty</property>
</auto-text>
</page-header>
<page-footer>
<grid id="49">
<property name="marginBottom">1in</property>
<property name="height">0.5in</property>
<column id="50"/>
<row id="53">
<cell id="54">
<auto-text id="56">
<method
name="onRender"><![CDATA[this.text = this.text +
reportContext.getRenderOption().getOptions().get("format");]] ></method>
<property
name="type">page-variable</property>
<property
name="pageVariable">ReportLocation</property>
</auto-text>
</cell>
</row>
</grid>
</page-footer>
</simple-master-page>
</page-setup>
<body>
<table id="9">
<property name="dataSet">Data Set</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">ORDERNUMBER</property>
<text-property
name="displayName">ORDERNUMBER</text-property>
<expression name="expression"
type="javascript">dataSetRow["ORDERNUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRODUCTCODE</property>
<text-property
name="displayName">PRODUCTCODE</text-property>
<expression name="expression"
type="javascript">dataSetRow["PRODUCTCODE"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">QUANTITYORDERED</property>
<text-property
name="displayName">QUANTITYORDERED</text-property>
<expression name="expression"
type="javascript">dataSetRow["QUANTITYORDERED"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRICEEACH</property>
<text-property
name="displayName">PRICEEACH</text-property>
<expression name="expression"
type="javascript">dataSetRow["PRICEEACH"]</expression>
<property name="dataType">float</property>
</structure>
<structure>
<property name="name">ORDERLINENUMBER</property>
<text-property
name="displayName">ORDERLINENUMBER</text-property>
<expression name="expression"
type="javascript">dataSetRow["ORDERLINENUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">Aggregation</property>
<property name="dataType">float</property>
<property name="aggregateFunction">SUM</property>
<list-property name="arguments">
<structure>
<property name="name">Expression</property>
<expression name="value"
type="javascript">row["QUANTITYORDERED"]</expression>
</structure>
</list-property>
</structure>
</list-property>
<property name="pageBreakInterval">4</property>
<column id="38"/>
<column id="39"/>
<column id="40"/>
<column id="41"/>
<column id="42"/>
<header>
<row id="10">
<cell id="11">
<label id="12">
<text-property
name="text">ORDERNUMBER</text-property>
</label>
</cell>
<cell id="13">
<label id="14">
<text-property
name="text">PRODUCTCODE</text-property>
</label>
</cell>
<cell id="15">
<label id="16">
<text-property
name="text">QUANTITYORDERED</text-property>
</label>
</cell>
<cell id="17">
<label id="18">
<text-property
name="text">PRICEEACH</text-property>
</label>
</cell>
<cell id="19">
<label id="20">
<text-property
name="text">ORDERLINENUMBER</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="21">
<cell id="22">
<data id="23">
<property
name="resultSetColumn">ORDERNUMBER</property>
</data>
</cell>
<cell id="24">
<data id="25">
<property
name="resultSetColumn">PRODUCTCODE</property>
</data>
</cell>
<cell id="26">
<data name="qtyelement" id="27">
<property
name="resultSetColumn">QUANTITYORDERED</property>
</data>
</cell>
<cell id="28">
<data id="29">
<property
name="resultSetColumn">PRICEEACH</property>
</data>
</cell>
<cell id="30">
<data id="31">
<property
name="resultSetColumn">ORDERLINENUMBER</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="32">
<property name="backgroundColor">#004080</property>
<cell id="33"/>
<cell id="34"/>
<cell id="35">
<data id="45">
<property name="color">#FFFFFF</property>
<method
name="onCreate"><![CDATA[reportContext.setPageVariable("totalForAllPages ",this.getValue());
]]></method>
<property
name="resultSetColumn">Aggregation</property>
</data>
</cell>
<cell id="36"/>
<cell id="37"/>
</row>
</footer>
</table>
</body>
<property name="pageVariables">
<variable-element name="pageqty">
<property name="type">page</property>
</variable-element>
<variable-element name="totalForAllPages">
<property name="type">report</property>
</variable-element>
<variable-element name="ReportLocation">
<property name="type">report</property>
</variable-element>
</property>
</report>


On 5/17/2011 6:00 AM, forums-noreply@eclipse.org wrote:
> Hello All,
>
> QUERY 1 ____________________________________________________________
> ___________
> My report has multiple pages and requirement is to show the
> Subtotal on the page based on the Row count. As the number
> of row are not fix as the size of of the report content
> varies. I need some way by which I could add SUBTOTAL at the end of
> the Page and then page break happens. later on when it
> reaches End of file at that time I want to add grand total
> and it should not break the second last page after SUBTOTAL
> immediately if it can accommodate the Grand total row as
> well.
>
> Currently to achieve this I have used row.__rownum approach
> I have grouped page by rownum and i have set a fix
> (hardcoded) interval it works but it is not good solution
> because when page content is long at that time hardcoded
> interval will show the subtotal on next page somewhere in
> the middle.
>
> Please tell me some way by which I could achieve this.
> ____________________________________________________________
> ___________
> QUERY 2
> ____________________________________________________________
> ___________
> Another thing which I want to achieve is adding filename to
> the footer. Whenever user download the Pdf/excel page
> footer should have name of the file e.g shippingAddress.pdf etc
>
> can you please guide how can i dynamically add the file name
> to the footer? is it possible using Birt api? as I am using
> birt api to export the report so it would be good if i can
> get some help on that side.
>
>
> Thanks
> Shivani
Re: Add Subtotal to the BIRT report before page break [message #671543 is a reply to message #671361] Wed, 18 May 2011 09:17 Go to previous messageGo to next message
shine_1611 is currently offline shine_1611Friend
Messages: 20
Registered: April 2011
Location: Mumbai
Junior Member
Hi Jason,

this solution I have already tried but this does not fit for my Query-1 as I want SUbtotal and Grandtotal on the Maine page not on the footer or header.
see the attached code that has subtotal and grand total but my issue is page break. I can not hardcode the interval of page break as I mentioned the content which my report has that is text and its length going to vary per record. so I do not want SUBTOTAL to come on next page it should come in the end of the page.

CODE SNIPPET -- ADDED SUBTOTAL AND GRANDTOTAL
------------------------------------------------------------ ----------------

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.22" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 2.6.2.r262_v20110209 Build &lt;2.6.2.v20110214-1523></property>
<property name="units">cm</property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<property name="imageDPI">96</property>
<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source" id="7">
<property name="odaDriverClass">org.eclipse.birt.report.data.oda.sampledb.Driver </property>
<property name="odaURL">jdbc:classicmodels:sampledb</property>
<property name="odaUser">ClassicModels</property>
<property name="OdaConnProfileName"></property>
</oda-data-source>
</data-sources>
<data-sets>
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " name="Data Set" id="8">
<list-property name="columnHints">
<structure>
<property name="columnName">ORDERNUMBER</property>
<text-property name="displayName">ORDERNUMBER</text-property>
</structure>
<structure>
<property name="columnName">PRODUCTCODE</property>
<text-property name="displayName">PRODUCTCODE</text-property>
</structure>
<structure>
<property name="columnName">QUANTITYORDERED</property>
<text-property name="displayName">QUANTITYORDERED</text-property>
</structure>
<structure>
<property name="columnName">PRICEEACH</property>
<text-property name="displayName">PRICEEACH</text-property>
</structure>
<structure>
<property name="columnName">ORDERLINENUMBER</property>
<text-property name="displayName">ORDERLINENUMBER</text-property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="dataType">float</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="nativeName">ORDERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="nativeName">PRODUCTCODE</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="nativeName">QUANTITYORDERED</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="nativeName">PRICEEACH</property>
<property name="dataType">float</property>
<property name="nativeDataType">8</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="nativeName">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">5</property>
</structure>
</list-property>
<xml-property name="queryText"><![CDATA[select *
from orderdetails]]></xml-property>
<xml-property name="designerValues"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<model:DesignValues xmlns:design="http://www.eclipse.org/datatools/connectivity/oda/design" xmlns:model="http://www.eclipse.org/birt/report/model/adapter/odaModel">
<Version>1.0</Version>
<design:ResultSets derivedMetaData="true">
<design:resultSetDefinitions>
<design:resultSetColumns>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERNUMBER</design:name>
<design:position>1</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERNUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERNUMBER</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>PRODUCTCODE</design:name>
<design:position>2</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>PRODUCTCODE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>PRODUCTCODE</design:label>
<design:formattingHints>
<design:displaySize>15</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>QUANTITYORDERED</design:name>
<design:position>3</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>QUANTITYORDERED</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>QUANTITYORDERED</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>PRICEEACH</design:name>
<design:position>4</design:position>
<design:nativeDataTypeCode>8</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>PRICEEACH</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>PRICEEACH</design:label>
<design:formattingHints>
<design:displaySize>22</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERLINENUMBER</design:name>
<design:position>5</design:position>
<design:nativeDataTypeCode>5</design:nativeDataTypeCode>
<design:precision>5</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERLINENUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERLINENUMBER</design:label>
<design:formattingHints>
<design:displaySize>6</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
</design:resultSetColumns>
<design:criteria/>
</design:resultSetDefinitions>
</design:ResultSets>
</model:DesignValues>]]></xml-property>
</oda-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">sans-serif</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab-cell" id="5">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab" id="6">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<method name="onPageEnd"><![CDATA[var qtys = this.getInstancesByElementName("qtyelement");
var tmp=0;
if( qtys != null ){
for( var i=0; i< qtys.length; i++ ){
//Instance of DataItemInstance
var qty = qtys[i];
tmp+=parseInt(qty.getValue());
}

}
reportContext.setPageVariable("pageqty",tmp);]]></method>
<page-header>
<auto-text id="44">
<property name="backgroundColor">#FF8080</property>
<property name="type">page-variable</property>
<property name="pageVariable">pageqty</property>
</auto-text>
</page-header>
<page-footer>
<text id="3">
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<value-of>new Date()</value-of>]]></text-property>
</text>
</page-footer>
</simple-master-page>
</page-setup>
<body>
<table id="9">
<property name="dataSet">Data Set</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">ORDERNUMBER</property>
<text-property name="displayName">ORDERNUMBER</text-property>
<expression name="expression" type="javascript">dataSetRow["ORDERNUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRODUCTCODE</property>
<text-property name="displayName">PRODUCTCODE</text-property>
<expression name="expression" type="javascript">dataSetRow["PRODUCTCODE"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">QUANTITYORDERED</property>
<text-property name="displayName">QUANTITYORDERED</text-property>
<expression name="expression" type="javascript">dataSetRow["QUANTITYORDERED"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRICEEACH</property>
<text-property name="displayName">PRICEEACH</text-property>
<expression name="expression" type="javascript">dataSetRow["PRICEEACH"]</expression>
<property name="dataType">float</property>
</structure>
<structure>
<property name="name">ORDERLINENUMBER</property>
<text-property name="displayName">ORDERLINENUMBER</text-property>
<expression name="expression" type="javascript">dataSetRow["ORDERLINENUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">subtotalqty</property>
<text-property name="displayName">subtotalqty</text-property>
<property name="dataType">float</property>
<simple-property-list name="aggregateOn">
<value>subtotal</value>
</simple-property-list>
<property name="aggregateFunction">SUM</property>
<list-property name="arguments">
<structure>
<property name="name">Expression</property>
<expression name="value" type="javascript">row["QUANTITYORDERED"]</expression>
</structure>
</list-property>
</structure>
<structure>
<property name="name">Subtotal</property>
<text-property name="displayName">SubtotalQty</text-property>
<property name="dataType">float</property>
<simple-property-list name="aggregateOn">
<value>subtotal</value>
</simple-property-list>
<property name="aggregateFunction">SUM</property>
<list-property name="arguments">
<structure>
<property name="name">Expression</property>
<expression name="value" type="javascript">row["QUANTITYORDERED"]</expression>
</structure>
</list-property>
</structure>
<structure>
<property name="name">gtqty</property>
<text-property name="displayName">gtqty</text-property>
<property name="dataType">float</property>
<property name="aggregateFunction">SUM</property>
<list-property name="arguments">
<structure>
<property name="name">Expression</property>
<expression name="value" type="javascript">row["QUANTITYORDERED"]</expression>
</structure>
</list-property>
</structure>
</list-property>
<property name="pageBreakInterval">0</property>
<column id="38"/>
<column id="39"/>
<column id="40"/>
<column id="41"/>
<column id="42"/>
<header>
<row id="10">
<cell id="11">
<label id="12">
<text-property name="text">ORDERNUMBER</text-property>
</label>
</cell>
<cell id="13">
<label id="14">
<text-property name="text">PRODUCTCODE</text-property>
</label>
</cell>
<cell id="15">
<label id="16">
<text-property name="text">QUANTITYORDERED</text-property>
</label>
</cell>
<cell id="17">
<label id="18">
<text-property name="text">PRICEEACH</text-property>
</label>
</cell>
<cell id="19">
<label id="20">
<text-property name="text">ORDERLINENUMBER</text-property>
</label>
</cell>
</row>
</header>
<group id="46">
<property name="groupName">subtotal</property>
<property name="interval">interval</property>
<property name="intervalRange">40.0</property>
<expression name="keyExpr" type="javascript">row.__rownum</expression>
<property name="hideDetail">false</property>
<header>
<row id="47">
<cell id="48"/>
<cell id="49"/>
<cell id="50"/>
<cell id="51"/>
<cell id="52"/>
</row>
</header>
<footer>
<row id="53">
<cell id="54">
<label id="78">
<property name="fontWeight">bold</property>
<text-property name="text">SUBTOTAL</text-property>
</label>
</cell>
<cell id="55"/>
<cell id="56">
<data id="77">
<property name="resultSetColumn">Subtotal</property>
</data>
</cell>
<cell id="57"/>
<cell id="58"/>
</row>
</footer>
</group>
<detail>
<row id="21">
<cell id="22">
<data id="23">
<property name="resultSetColumn">ORDERNUMBER</property>
</data>
</cell>
<cell id="24">
<data id="25">
<property name="resultSetColumn">PRODUCTCODE</property>
</data>
</cell>
<cell id="26">
<data name="qtyelement" id="27">
<property name="resultSetColumn">QUANTITYORDERED</property>
</data>
</cell>
<cell id="28">
<data id="29">
<property name="resultSetColumn">PRICEEACH</property>
</data>
</cell>
<cell id="30">
<data id="31">
<property name="resultSetColumn">ORDERLINENUMBER</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="32">
<cell id="33">
<label id="79">
<property name="fontWeight">bold</property>
<text-property name="text">GrandTOTAL</text-property>
</label>
</cell>
<cell id="34"/>
<cell id="35">
<data id="80">
<property name="resultSetColumn">gtqty</property>
</data>
</cell>
<cell id="36"/>
<cell id="37"/>
</row>
</footer>
</table>
</body>
<property name="pageVariables">
<variable-element name="pageqty">
<property name="type">page</property>
</variable-element>
</property>
</report>
------------------------------------------------------------ -------------------------
Re: Add Subtotal to the BIRT report before page break [message #671545 is a reply to message #671543] Wed, 18 May 2011 09:18 Go to previous messageGo to next message
shine_1611 is currently offline shine_1611Friend
Messages: 20
Registered: April 2011
Location: Mumbai
Junior Member
Also about the report version I am using BIRT 2.6.2 only.
Re: Add Subtotal to the BIRT report before page break [message #671660 is a reply to message #671543] Wed, 18 May 2011 14:55 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I do not know of a way to do this in the group footer. You could do it
in the group header though. It would be good to log a bug to repeat the
group footer on page breaks.

Jason

On 5/18/2011 5:17 AM, forums-noreply@eclipse.org wrote:
> <?xml version="1.0" encoding="UTF-8"?>
> <report xmlns="http://www.eclipse.org/birt/2005/design"
> version="3.2.22" id="1">
> <property name="createdBy">Eclipse BIRT Designer Version
> 2.6.2.r262_v20110209 Build
> <2.6.2.v20110214-1523></property>
> <property name="units">cm</property>
> <property
> name="iconFile">/templates/blank_report.gif</property>
> <property name="bidiLayoutOrientation">ltr</property>
> <property name="imageDPI">96</property>
> <data-sources>
> <oda-data-source
> extensionID="org.eclipse.birt.report.data.oda.jdbc"
> name="Data Source" id="7">
> <property
> name="odaDriverClass">org.eclipse.birt.report.data.oda.sampledb.Driver
> </property>
> <property
> name="odaURL">jdbc:classicmodels:sampledb</property>
> <property
> name="odaUser">ClassicModels</property>
> <property name="OdaConnProfileName"></property>
> </oda-data-source>
> </data-sources>
> <data-sets>
> <oda-data-set
> extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet
> " name="Data Set" id="8">
> <list-property name="columnHints">
> <structure>
> <property
> name="columnName">ORDERNUMBER</property>
> <text-property
> name="displayName">ORDERNUMBER</text-property>
> </structure>
> <structure>
> <property
> name="columnName">PRODUCTCODE</property>
> <text-property
> name="displayName">PRODUCTCODE</text-property>
> </structure>
> <structure>
> <property
> name="columnName">QUANTITYORDERED</property>
> <text-property
> name="displayName">QUANTITYORDERED</text-property>
> </structure>
> <structure>
> <property
> name="columnName">PRICEEACH</property>
> <text-property
> name="displayName">PRICEEACH</text-property>
> </structure>
> <structure>
> <property
> name="columnName">ORDERLINENUMBER</property>
> <text-property
> name="displayName">ORDERLINENUMBER</text-property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property
> name="position">1</property>
> <property
> name="name">ORDERNUMBER</property>
> <property
> name="dataType">integer</property>
> </structure>
> <structure>
> <property
> name="position">2</property>
> <property
> name="name">PRODUCTCODE</property>
> <property
> name="dataType">string</property>
> </structure>
> <structure>
> <property
> name="position">3</property>
> <property
> name="name">QUANTITYORDERED</property>
> <property
> name="dataType">integer</property>
> </structure>
> <structure>
> <property
> name="position">4</property>
> <property
> name="name">PRICEEACH</property>
> <property
> name="dataType">float</property>
> </structure>
> <structure>
> <property
> name="position">5</property>
> <property
> name="name">ORDERLINENUMBER</property>
> <property
> name="dataType">integer</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">Data
> Source</property>
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property
> name="name">ORDERNUMBER</property>
> <property
> name="nativeName">ORDERNUMBER</property>
> <property
> name="dataType">integer</property>
> <property
> name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property
> name="name">PRODUCTCODE</property>
> <property
> name="nativeName">PRODUCTCODE</property>
> <property
> name="dataType">string</property>
> <property
> name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property
> name="name">QUANTITYORDERED</property>
> <property
> name="nativeName">QUANTITYORDERED</property>
> <property
> name="dataType">integer</property>
> <property
> name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property
> name="name">PRICEEACH</property>
> <property
> name="nativeName">PRICEEACH</property>
> <property
> name="dataType">float</property>
> <property
> name="nativeDataType">8</property>
> </structure>
> <structure>
> <property name="position">5</property>
> <property
> name="name">ORDERLINENUMBER</property>
> <property
> name="nativeName">ORDERLINENUMBER</property>
> <property
> name="dataType">integer</property>
> <property
> name="nativeDataType">5</property>
> </structure>
> </list-property>
> <xml-property name="queryText"><![CDATA[select
> *
> from orderdetails]]></xml-property>
> <xml-property
> name="designerValues"><![CDATA[<?xml version="1.0"
> encoding="UTF-8"?>
> <model:DesignValues
> xmlns:design="http://www.eclipse.org/datatools/connectivity/oda/design"
> xmlns:model="http://www.eclipse.org/birt/report/model/adapter/odaModel">
> <Version>1.0</Version>
> <design:ResultSets derivedMetaData="true">
> <design:resultSetDefinitions>
> <design:resultSetColumns>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>ORDERNUMBER</design:name>
> <design:position>1</design:position>
> <design:nativeDataTypeCode>4</design:nativeDataTypeCode>
> <design:precision>10</design:precision>
> <design:scale>0</design:scale>
> <design:nullability>Nullable</design:nullability>
> <design:uiHints>
> <design:displayName>ORDERNUMBER</design:displayName>
> </design:uiHints>
> </design:attributes>
> <design:usageHints>
> <design:label>ORDERNUMBER</design:label>
> <design:formattingHints>
> <design:displaySize>11</design:displaySize>
> </design:formattingHints>
> </design:usageHints>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>PRODUCTCODE</design:name>
> <design:position>2</design:position>
> <design:nativeDataTypeCode>12</design:nativeDataTypeCode>
> <design:precision>15</design:precision>
> <design:scale>0</design:scale>
> <design:nullability>Nullable</design:nullability>
> <design:uiHints>
> <design:displayName>PRODUCTCODE</design:displayName>
> </design:uiHints>
> </design:attributes>
> <design:usageHints>
> <design:label>PRODUCTCODE</design:label>
> <design:formattingHints>
> <design:displaySize>15</design:displaySize>
> </design:formattingHints>
> </design:usageHints>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>QUANTITYORDERED</design:name>
> <design:position>3</design:position>
> <design:nativeDataTypeCode>4</design:nativeDataTypeCode>
> <design:precision>10</design:precision>
> <design:scale>0</design:scale>
> <design:nullability>Nullable</design:nullability>
> <design:uiHints>
> <design:displayName>QUANTITYORDERED</design:displayName>
> </design:uiHints>
> </design:attributes>
> <design:usageHints>
> <design:label>QUANTITYORDERED</design:label>
> <design:formattingHints>
> <design:displaySize>11</design:displaySize>
> </design:formattingHints>
> </design:usageHints>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>PRICEEACH</design:name>
> <design:position>4</design:position>
> <design:nativeDataTypeCode>8</design:nativeDataTypeCode>
> <design:precision>15</design:precision>
> <design:scale>0</design:scale>
> <design:nullability>Nullable</design:nullability>
> <design:uiHints>
> <design:displayName>PRICEEACH</design:displayName>
> </design:uiHints>
> </design:attributes>
> <design:usageHints>
> <design:label>PRICEEACH</design:label>
> <design:formattingHints>
> <design:displaySize>22</design:displaySize>
> </design:formattingHints>
> </design:usageHints>
> </design:resultColumnDefinitions>
> <design:resultColumnDefinitions>
> <design:attributes>
> <design:name>ORDERLINENUMBER</design:name>
> <design:position>5</design:position>
> <design:nativeDataTypeCode>5</design:nativeDataTypeCode>
> <design:precision>5</design:precision>
> <design:scale>0</design:scale>
> <design:nullability>Nullable</design:nullability>
> <design:uiHints>
> <design:displayName>ORDERLINENUMBER</design:displayName>
> </design:uiHints>
> </design:attributes>
> <design:usageHints>
> <design:label>ORDERLINENUMBER</design:label>
> <design:formattingHints>
> <design:displaySize>6</design:displaySize>
> </design:formattingHints>
> </design:usageHints>
> </design:resultColumnDefinitions>
> </design:resultSetColumns>
> <design:criteria/>
> </design:resultSetDefinitions>
> </design:ResultSets>
> </model:DesignValues>]]></xml-property>
> </oda-data-set>
> </data-sets>
> <styles>
> <style name="report" id="4">
> <property
> name="fontFamily">sans-serif</property>
> <property name="fontSize">10pt</property>
> </style>
> <style name="crosstab-cell" id="5">
> <property
> name="borderBottomColor">#CCCCCC</property>
> <property
> name="borderBottomStyle">solid</property>
> <property
> name="borderBottomWidth">1pt</property>
> <property
> name="borderLeftColor">#CCCCCC</property>
> <property
> name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">1pt</property>
> <property
> name="borderRightColor">#CCCCCC</property>
> <property
> name="borderRightStyle">solid</property>
> <property
> name="borderRightWidth">1pt</property>
> <property
> name="borderTopColor">#CCCCCC</property>
> <property
> name="borderTopStyle">solid</property>
> <property name="borderTopWidth">1pt</property>
> </style>
> <style name="crosstab" id="6">
> <property
> name="borderBottomColor">#CCCCCC</property>
> <property
> name="borderBottomStyle">solid</property>
> <property
> name="borderBottomWidth">1pt</property>
> <property
> name="borderLeftColor">#CCCCCC</property>
> <property
> name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">1pt</property>
> <property
> name="borderRightColor">#CCCCCC</property>
> <property
> name="borderRightStyle">solid</property>
> <property
> name="borderRightWidth">1pt</property>
> <property
> name="borderTopColor">#CCCCCC</property>
> <property
> name="borderTopStyle">solid</property>
> <property name="borderTopWidth">1pt</property>
> </style>
> </styles>
> <page-setup>
> <simple-master-page name="Simple MasterPage"
> id="2">
> <method name="onPageEnd"><![CDATA[var qtys =
> this.getInstancesByElementName("qtyelement");
> var tmp=0;
> if( qtys != null ){
> for( var i=0; i< qtys.length; i++ ){
> //Instance of DataItemInstance
> var qty = qtys[i];
> tmp+=parseInt(qty.getValue());
> }
>
> }
> reportContext.setPageVariable("pageqty",tmp);]]></method>
> <page-header>
> <auto-text id="44">
> <property
> name="backgroundColor">#FF8080</property>
> <property
> name="type">page-variable</property>
> <property
> name="pageVariable">pageqty</property>
> </auto-text>
> </page-header>
> <page-footer>
> <text id="3">
> <property
> name="contentType">html</property>
> <text-property
> name="content"><![CDATA[<value-of>new
> Date()</value-of>]]></text-property>
> </text>
> </page-footer>
> </simple-master-page>
> </page-setup>
> <body>
> <table id="9">
> <property name="dataSet">Data Set</property>
> <list-property name="boundDataColumns">
> <structure>
> <property
> name="name">ORDERNUMBER</property>
> <text-property
> name="displayName">ORDERNUMBER</text-property>
> <expression name="expression"
> type="javascript">dataSetRow["ORDERNUMBER"]</expression >
> <property
> name="dataType">integer</property>
> </structure>
> <structure>
> <property
> name="name">PRODUCTCODE</property>
> <text-property
> name="displayName">PRODUCTCODE</text-property>
> <expression name="expression"
> type="javascript">dataSetRow["PRODUCTCODE"]</expression >
> <property
> name="dataType">string</property>
> </structure>
> <structure>
> <property
> name="name">QUANTITYORDERED</property>
> <text-property
> name="displayName">QUANTITYORDERED</text-property>
> <expression name="expression"
> type="javascript">dataSetRow["QUANTITYORDERED"]</expression
>>
> <property
> name="dataType">integer</property>
> </structure>
> <structure>
> <property
> name="name">PRICEEACH</property>
> <text-property
> name="displayName">PRICEEACH</text-property>
> <expression name="expression"
> type="javascript">dataSetRow["PRICEEACH"]</expression>
> <property
> name="dataType">float</property>
> </structure>
> <structure>
> <property
> name="name">ORDERLINENUMBER</property>
> <text-property
> name="displayName">ORDERLINENUMBER</text-property>
> <expression name="expression"
> type="javascript">dataSetRow["ORDERLINENUMBER"]</expression
>>
> <property
> name="dataType">integer</property>
> </structure>
> <structure>
> <property
> name="name">subtotalqty</property>
> <text-property
> name="displayName">subtotalqty</text-property>
> <property
> name="dataType">float</property>
> <simple-property-list
> name="aggregateOn">
> <value>subtotal</value>
> </simple-property-list>
> <property
> name="aggregateFunction">SUM</property>
> <list-property name="arguments">
> <structure>
> <property
> name="name">Expression</property>
> <expression name="value"
> type="javascript">row["QUANTITYORDERED"]</expression>
> </structure>
> </list-property>
> </structure>
> <structure>
> <property
> name="name">Subtotal</property>
> <text-property
> name="displayName">SubtotalQty</text-property>
> <property
> name="dataType">float</property>
> <simple-property-list
> name="aggregateOn">
> <value>subtotal</value>
> </simple-property-list>
> <property
> name="aggregateFunction">SUM</property>
> <list-property name="arguments">
> <structure>
> <property
> name="name">Expression</property>
> <expression name="value"
> type="javascript">row["QUANTITYORDERED"]</expression>
> </structure>
> </list-property>
> </structure>
> <structure>
> <property name="name">gtqty</property>
> <text-property
> name="displayName">gtqty</text-property>
> <property
> name="dataType">float</property>
> <property
> name="aggregateFunction">SUM</property>
> <list-property name="arguments">
> <structure>
> <property
> name="name">Expression</property>
> <expression name="value"
> type="javascript">row["QUANTITYORDERED"]</expression>
> </structure>
> </list-property>
> </structure>
> </list-property>
> <property name="pageBreakInterval">0</property>
> <column id="38"/>
> <column id="39"/>
> <column id="40"/>
> <column id="41"/>
> <column id="42"/>
> <header>
> <row id="10">
> <cell id="11">
> <label id="12">
> <text-property
> name="text">ORDERNUMBER</text-property>
> </label>
> </cell>
> <cell id="13">
> <label id="14">
> <text-property
> name="text">PRODUCTCODE</text-property>
> </label>
> </cell>
> <cell id="15">
> <label id="16">
> <text-property
> name="text">QUANTITYORDERED</text-property>
> </label>
> </cell>
> <cell id="17">
> <label id="18">
> <text-property
> name="text">PRICEEACH</text-property>
> </label>
> </cell>
> <cell id="19">
> <label id="20">
> <text-property
> name="text">ORDERLINENUMBER</text-property>
> </label>
> </cell>
> </row>
> </header>
> <group id="46">
> <property
> name="groupName">subtotal</property>
> <property
> name="interval">interval</property>
> <property
> name="intervalRange">40.0</property>
> <expression name="keyExpr"
> type="javascript">row.__rownum</expression>
> <property
> name="hideDetail">false</property>
> <header>
> <row id="47">
> <cell id="48"/>
> <cell id="49"/>
> <cell id="50"/>
> <cell id="51"/>
> <cell id="52"/>
> </row>
> </header>
> <footer>
> <row id="53">
> <cell id="54">
> <label id="78">
> <property
> name="fontWeight">bold</property>
> <text-property
> name="text">SUBTOTAL</text-property>
> </label>
> </cell>
> <cell id="55"/>
> <cell id="56">
> <data id="77">
> <property
> name="resultSetColumn">Subtotal</property>
> </data>
> </cell>
> <cell id="57"/>
> <cell id="58"/>
> </row>
> </footer>
> </group>
> <detail>
> <row id="21">
> <cell id="22">
> <data id="23">
> <property
> name="resultSetColumn">ORDERNUMBER</property>
> </data>
> </cell>
> <cell id="24">
> <data id="25">
> <property
> name="resultSetColumn">PRODUCTCODE</property>
> </data>
> </cell>
> <cell id="26">
> <data name="qtyelement" id="27">
> <property
> name="resultSetColumn">QUANTITYORDERED</property>
> </data>
> </cell>
> <cell id="28">
> <data id="29">
> <property
> name="resultSetColumn">PRICEEACH</property>
> </data>
> </cell>
> <cell id="30">
> <data id="31">
> <property
> name="resultSetColumn">ORDERLINENUMBER</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="32">
> <cell id="33">
> <label id="79">
> <property
> name="fontWeight">bold</property>
> <text-property
> name="text">GrandTOTAL</text-property>
> </label>
> </cell>
> <cell id="34"/>
> <cell id="35">
> <data id="80">
> <property
> name="resultSetColumn">gtqty</property>
> </data>
> </cell>
> <cell id="36"/>
> <cell id="37"/>
> </row>
> </footer>
> </table>
> </body>
> <property name="pageVariables">
> <variable-element name="pageqty">
> <property name="type">page</property>
> </variable-element>
> </property>
> </report>
Previous Topic:Replace Data Set Columns Dynamically Based on Parameter
Next Topic:Does reportContext.getOutputFormat just work with runAndRenderTask?
Goto Forum:
  


Current Time: Wed Nov 26 23:31:13 GMT 2014

Powered by FUDForum. Page generated in 0.01879 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software