Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Checking repeated group header - BIRT 2.5.1 (Conditionally add text in repeating Group Header)
Checking repeated group header - BIRT 2.5.1 [message #498336] Mon, 16 November 2009 14:10 Go to next message
Manilal  is currently offline Manilal Friend
Messages: 7
Registered: October 2009
Junior Member
Hi,

Using BIRT 2.5.1

In my reports I need to conditionally display some text if the same Group Header is repeated. The repeating Group Header should show some text like 'Continued...'

I'm looking for a solution something similar to 'InRepeatedGroupHeader' feature in Crystal Reports...

Please let me know what would be a better better solution with BIRT 2.5.1

Thanks in advance,
Manilal
Re: Checking repeated group header - BIRT 2.5.1 [message #498426 is a reply to message #498336] Mon, 16 November 2009 20:51 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Manilal,

There is a way of doing this in script, but it would be good if you
could log a bugzilla entry to get it added to the GUI.
To do in script, for the table that is grouped do the following:

Enter a detail row below the group header (Group header is not
re-evaluated for page breaks)

In the detail row just add a text/label element with the value
"Continued..."

By default this will create a new row for every detail row. To turn it
off we will use visibility expression but first add the following
scripts to the table.

onPrepare
//The variable represents the first group to appear on a page
reportContext.setGlobalVariable("grpPageStart", "none");

onPageBreak
//This will give the first group on the new page.
//Just set a global variable with its value
var currGrp = this.getRowData().getColumnValue("ORDERNUMBER");
reportContext.setGlobalVariable("grpPageStart", currGrp);

Next on the detail row enter the following script on the onCreate event
//This will store for every row resulting in the last group on a page
//So if this variable is equal to the grpPageStart we know the header is
//repeating
var tst = this.getRowData().getColumnValue("ORDERNUMBER");
reportContext.setGlobalVariable("prev", tst);


Final thing to do is set a visibility expression on the detail row we
added with the following expression:

var pg = reportContext.getGlobalVariable("grpPageStart");
var tst = reportContext.getGlobalVariable("prev");
//group header continued
if( pg ==tst){
reportContext.setGlobalVariable("grpPageStart", "clear" );
false;//Show the continued row
}else{
reportContext.setGlobalVariable("grpPageStart", "clear" );
true;//Dont show the continued row
}

Attached is a sample report

Jason


<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.20"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.5.1.v20090903 Build &lt;2.5.1.v20090917-1447></property>
<property name="units">in</property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</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>
</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: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" 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-cell" 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>
<style name="table-header" id="57">
<property name="backgroundColor">#6078BF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="table-footer" id="58">
<property name="backgroundColor">#6078BF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="table-detail" id="59">
<property name="backgroundColor">#E6ECFF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">x-small</property>
<property name="fontWeight">bold</property>
<property name="color">#000080</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="table-group-header-1" id="60">
<property name="backgroundColor">#809FFF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="table-group-footer-1" id="61">
<property name="backgroundColor">#809FFF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="special-header" id="62">
<property name="backgroundColor">#6078BF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">medium</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="crosstab-detail" id="63">
<property name="backgroundColor">#E6ECFF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">x-small</property>
<property name="fontWeight">bold</property>
<property name="color">#000080</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="crosstab-header" id="64">
<property name="backgroundColor">#6078BF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="mydata" id="65">
<property name="color">orange</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<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">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">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">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">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">dataSetRow["ORDERLINENUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
</list-property>
<method
name="onPrepare"><![CDATA[reportContext.setGlobalVariable( "grpPageStart",
"none");]]></method>
<method name="onPageBreak"><![CDATA[//This will give the
first group on the new page
var currGrp = this.getRowData().getColumnValue("ORDERNUMBER");
reportContext.setGlobalVariable("grpPageStart", currGrp);]]></method>
<property name="pageBreakInterval">39</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="43">
<property name="groupName">NewTableGroup1</property>
<property name="interval">none</property>
<property name="sortDirection">asc</property>
<expression name="keyExpr"
type="javascript">row["ORDERNUMBER"]</expression>
<structure name="toc">
<expression name="expressionValue"
type="javascript">row["ORDERNUMBER"]</expression>
</structure>
<property name="repeatHeader">true</property>
<property name="hideDetail">false</property>
<property name="pageBreakAfter">auto</property>
<property name="pageBreakBefore">auto</property>
<property name="pageBreakInside">auto</property>
<header>
<row id="44">
<cell id="45">
<data id="56">
<property
name="resultSetColumn">ORDERNUMBER</property>
</data>
</cell>
<cell id="46"/>
<cell id="47"/>
<cell id="48"/>
<cell id="49"/>
</row>
</header>
<footer>
<row id="50">
<cell id="51"/>
<cell id="52"/>
<cell id="53"/>
<cell id="54"/>
<cell id="55"/>
</row>
</footer>
</group>
<detail>
<row id="67">
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr"
type="javascript">var pg =
reportContext.getGlobalVariable("grpPageStart");&#13;
var tst = reportContext.getGlobalVariable("prev");&#13;
if( pg ==tst){&#13;
reportContext.setGlobalVariable("grpPageStart", "clear" );&#13;
false;&#13;
}else{&#13;
reportContext.setGlobalVariable("grpPageStart", "clear" );&#13;
true;&#13;
}</expression>
</structure>
</list-property>
<cell id="68">
<label id="73">
<text-property
name="text">Continued</text-property>
</label>
</cell>
<cell id="69"/>
<cell id="70"/>
<cell id="71"/>
<cell id="72"/>
</row>
<row id="21">
<method name="onCreate"><![CDATA[//This will store
for every row resulting in the last group on a page
var tst = this.getRowData().getColumnValue("ORDERNUMBER");
reportContext.setGlobalVariable("prev", tst);

]]></method>
<cell id="22"/>
<cell id="24">
<data id="25">
<property
name="resultSetColumn">PRODUCTCODE</property>
</data>
</cell>
<cell id="26">
<data 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"/>
<cell id="34"/>
<cell id="35"/>
<cell id="36"/>
<cell id="37"/>
</row>
</footer>
</table>
</body>
</report>


Manilal wrote:
> Hi,
>
> Using BIRT 2.5.1
>
> In my reports I need to conditionally display some text if the same
> Group Header is repeated. The repeating Group Header should show some
> text like 'Continued...'
>
> I'm looking for a solution something similar to 'InRepeatedGroupHeader'
> feature in Crystal Reports...
>
> Please let me know what would be a better better solution with BIRT 2.5.1
>
> Thanks in advance,
> Manilal
Re: Checking repeated group header - BIRT 2.5.1 [message #641299 is a reply to message #498426] Wed, 24 November 2010 19:12 Go to previous messageGo to next message
Eclipse User is currently offline Eclipse UserFriend
Messages: 7
Registered: October 2010
Junior Member
Is there an update to this fix, or has this been logged in bugzilla?

We are currently using 2.5.2 and the attached solution does not work. On some of the continuation pages there is a record that prints at the top of the page, before the "Continued" line. On other continuation pages there is no "Continued" line. Also, in the pdf output there is never a "Continued" line.

Any updates would be appreciated.

Thanks
Re: Checking repeated group header - BIRT 2.5.1 [message #641337 is a reply to message #641299] Thu, 25 November 2010 04:13 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Revised report is attached. This report requires separate run and
render task, which means you can not run directly to pdf from the
toolbar. You have to use the /frameset mapping with format set to pdf
in the viewer or export the report to pdf from the viewer. If you are
using the api you execute a run task and then a render task.

The code is simple. In the onPageBreak event we write out the last
value for a page.

reportContext.setGlobalVariable("lst", this.getValue());
reportContext.setGlobalVariable("dn", false);

Then in a visibility expression on the continued label we check if the
current row matches that last. If it does we show the label once and
then hide it.

if(( reportContext.getGlobalVariable("lst") == row["ORDERNUMBER"]) &&
reportContext.getGlobalVariable("dn") == false){
reportContext.setGlobalVariable("dn", true);
false;
}else{
true;
}

Jason

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.21"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.5.2.v20100208 Build &lt;2.5.2.v20100210-0630></property>
<property name="units">in</property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</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>
</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: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" 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-cell" 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>
<style name="table-header" id="57">
<property name="backgroundColor">#6078BF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="table-footer" id="58">
<property name="backgroundColor">#6078BF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="table-detail" id="59">
<property name="backgroundColor">#E6ECFF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">x-small</property>
<property name="fontWeight">bold</property>
<property name="color">#000080</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="table-group-header-1" id="60">
<property name="backgroundColor">#809FFF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="table-group-footer-1" id="61">
<property name="backgroundColor">#809FFF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="special-header" id="62">
<property name="backgroundColor">#6078BF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">medium</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="crosstab-detail" id="63">
<property name="backgroundColor">#E6ECFF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">x-small</property>
<property name="fontWeight">bold</property>
<property name="color">#000080</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="crosstab-header" id="64">
<property name="backgroundColor">#6078BF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="mydata" id="65">
<property name="color">orange</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<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>
<text id="92">
<property name="contentType">auto</property>
<text-property name="content"><![CDATA[This report Requires
separate run and render task to work. If you export from the viewer to
PDF it should work but not directly to PDF.]]></text-property>
</text>
<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">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">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">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">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">dataSetRow["ORDERLINENUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
</list-property>
<property name="pageBreakInterval">0</property>
<column id="38">
<property name="suppressDuplicates">true</property>
</column>
<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="43">
<property name="groupName">NewTableGroup1</property>
<property name="interval">none</property>
<property name="sortDirection">asc</property>
<expression name="keyExpr"
type="javascript">row["ORDERNUMBER"]</expression>
<structure name="toc">
<expression name="expressionValue"
type="javascript">row["ORDERNUMBER"]</expression>
</structure>
<property name="repeatHeader">true</property>
<property name="hideDetail">false</property>
<property name="pageBreakAfter">auto</property>
<property name="pageBreakBefore">auto</property>
<property name="pageBreakInside">auto</property>
<header>
<row id="44">
<cell id="45">
<data id="56">
<list-property name="visibility">
<structure>
<property
name="format">all</property>
<expression name="valueExpr"
type="javascript">importPackage(Packages.java.io);&#13;
out = new PrintWriter( new FileWriter( "c:/test/scrw2events.txt", true )
);&#13;
out.println( "vis test" + row["ORDERNUMBER"]);&#13;
out.close();&#13;
false</expression>
</structure>
</list-property>
<method name="onPageBreak"><![CDATA[
reportContext.setGlobalVariable("lst", this.getValue());
reportContext.setGlobalVariable("dn", false);

]]></method>
<property
name="resultSetColumn">ORDERNUMBER</property>
</data>
</cell>
<cell id="46"/>
<cell id="47"/>
<cell id="48"/>
<cell id="49"/>
</row>
</header>
<footer>
<row id="50">
<cell id="51"/>
<cell id="52"/>
<cell id="53"/>
<cell id="54"/>
<cell id="55"/>
</row>
</footer>
</group>
<detail>
<row id="21">
<cell id="22">
<label id="73">
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr"
type="javascript">if(( reportContext.getGlobalVariable("lst") ==
row["ORDERNUMBER"]) &amp;&amp; reportContext.getGlobalVariable("dn") ==
false){&#13;
reportContext.setGlobalVariable("dn", true);&#13;
false;&#13;
}else{&#13;
true;&#13;
}</expression>
</structure>
</list-property>
<text-property
name="text">Continued</text-property>
</label>
</cell>
<cell id="24">
<data id="25">
<property
name="resultSetColumn">PRODUCTCODE</property>
</data>
</cell>
<cell id="26">
<data 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"/>
<cell id="34"/>
<cell id="35"/>
<cell id="36"/>
<cell id="37"/>
</row>
</footer>
</table>
</body>
</report>


On 11/24/2010 2:12 PM, birtdevsatwork@gmail.com wrote:
> Is there an update to this fix, or has this been logged in bugzilla?
> We are currently using 2.5.2 and the attached solution does not work. On
> some of the continuation pages there is a record that prints at the top
> of the page, before the "Continued" line. On other continuation pages
> there is no "Continued" line. Also, in the pdf output there is never a
> "Continued" line.
> Any updates would be appreciated.
> Thanks
Re: Checking repeated group header - BIRT 2.5.1 [message #641341 is a reply to message #641337] Thu, 25 November 2010 06:37 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I did some more testing on this report and it will not work with 2.5.2.
You can set the page break interval to something less than the pdf page
height but then it will show continued on every page.
Instead of using a continued label can you just edit the group and set
page break avoid on the inside drop down?

Jason

On 11/24/2010 11:13 PM, Jason Weathersby wrote:
> Revised report is attached. This report requires separate run and
> render task, which means you can not run directly to pdf from the
> toolbar. You have to use the /frameset mapping with format set to pdf in
> the viewer or export the report to pdf from the viewer. If you are using
> the api you execute a run task and then a render task.
>
> The code is simple. In the onPageBreak event we write out the last value
> for a page.
>
> reportContext.setGlobalVariable("lst", this.getValue());
> reportContext.setGlobalVariable("dn", false);
>
> Then in a visibility expression on the continued label we check if the
> current row matches that last. If it does we show the label once and
> then hide it.
>
> if(( reportContext.getGlobalVariable("lst") == row["ORDERNUMBER"]) &&
> reportContext.getGlobalVariable("dn") == false){
> reportContext.setGlobalVariable("dn", true);
> false;
> }else{
> true;
> }
>
> Jason
>
> <?xml version="1.0" encoding="UTF-8"?>
> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.21"
> id="1">
> <property name="createdBy">Eclipse BIRT Designer Version 2.5.2.v20100208
> Build &lt;2.5.2.v20100210-0630></property>
> <property name="units">in</property>
> <property name="iconFile">/templates/blank_report.gif</property>
> <property name="bidiLayoutOrientation">ltr</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>
> </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: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" 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-cell" 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>
> <style name="table-header" id="57">
> <property name="backgroundColor">#6078BF</property>
> <property name="fontFamily">"Arial"</property>
> <property name="fontSize">small</property>
> <property name="fontWeight">bold</property>
> <property name="color">#FFFFFF</property>
> <property name="paddingTop">0px</property>
> <property name="paddingLeft">0px</property>
> <property name="paddingBottom">0px</property>
> <property name="paddingRight">0px</property>
> </style>
> <style name="table-footer" id="58">
> <property name="backgroundColor">#6078BF</property>
> <property name="fontFamily">"Arial"</property>
> <property name="fontSize">small</property>
> <property name="fontWeight">bold</property>
> <property name="color">#FFFFFF</property>
> <property name="paddingTop">0px</property>
> <property name="paddingLeft">0px</property>
> <property name="paddingBottom">0px</property>
> <property name="paddingRight">0px</property>
> </style>
> <style name="table-detail" id="59">
> <property name="backgroundColor">#E6ECFF</property>
> <property name="fontFamily">"Arial"</property>
> <property name="fontSize">x-small</property>
> <property name="fontWeight">bold</property>
> <property name="color">#000080</property>
> <property name="paddingTop">0px</property>
> <property name="paddingLeft">0px</property>
> <property name="paddingBottom">0px</property>
> <property name="paddingRight">0px</property>
> </style>
> <style name="table-group-header-1" id="60">
> <property name="backgroundColor">#809FFF</property>
> <property name="fontFamily">"Arial"</property>
> <property name="fontSize">small</property>
> <property name="fontWeight">bold</property>
> <property name="color">#FFFFFF</property>
> <property name="paddingTop">0px</property>
> <property name="paddingLeft">0px</property>
> <property name="paddingBottom">0px</property>
> <property name="paddingRight">0px</property>
> </style>
> <style name="table-group-footer-1" id="61">
> <property name="backgroundColor">#809FFF</property>
> <property name="fontFamily">"Arial"</property>
> <property name="fontSize">small</property>
> <property name="fontWeight">bold</property>
> <property name="color">#FFFFFF</property>
> <property name="paddingTop">0px</property>
> <property name="paddingLeft">0px</property>
> <property name="paddingBottom">0px</property>
> <property name="paddingRight">0px</property>
> </style>
> <style name="special-header" id="62">
> <property name="backgroundColor">#6078BF</property>
> <property name="fontFamily">"Arial"</property>
> <property name="fontSize">medium</property>
> <property name="fontWeight">bold</property>
> <property name="color">#FFFFFF</property>
> <property name="paddingTop">0px</property>
> <property name="paddingLeft">0px</property>
> <property name="paddingBottom">0px</property>
> <property name="paddingRight">0px</property>
> </style>
> <style name="crosstab-detail" id="63">
> <property name="backgroundColor">#E6ECFF</property>
> <property name="fontFamily">"Arial"</property>
> <property name="fontSize">x-small</property>
> <property name="fontWeight">bold</property>
> <property name="color">#000080</property>
> <property name="paddingTop">0px</property>
> <property name="paddingLeft">0px</property>
> <property name="paddingBottom">0px</property>
> <property name="paddingRight">0px</property>
> </style>
> <style name="crosstab-header" id="64">
> <property name="backgroundColor">#6078BF</property>
> <property name="fontFamily">"Arial"</property>
> <property name="fontSize">small</property>
> <property name="fontWeight">bold</property>
> <property name="color">#FFFFFF</property>
> <property name="paddingTop">0px</property>
> <property name="paddingLeft">0px</property>
> <property name="paddingBottom">0px</property>
> <property name="paddingRight">0px</property>
> </style>
> <style name="mydata" id="65">
> <property name="color">orange</property>
> </style>
> </styles>
> <page-setup>
> <simple-master-page name="Simple MasterPage" id="2">
> <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>
> <text id="92">
> <property name="contentType">auto</property>
> <text-property name="content"><![CDATA[This report Requires separate run
> and render task to work. If you export from the viewer to PDF it should
> work but not directly to PDF.]]></text-property>
> </text>
> <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">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">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">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">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">dataSetRow["ORDERLINENUMBER"]</expression >
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> <property name="pageBreakInterval">0</property>
> <column id="38">
> <property name="suppressDuplicates">true</property>
> </column>
> <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="43">
> <property name="groupName">NewTableGroup1</property>
> <property name="interval">none</property>
> <property name="sortDirection">asc</property>
> <expression name="keyExpr"
> type="javascript">row["ORDERNUMBER"]</expression>
> <structure name="toc">
> <expression name="expressionValue"
> type="javascript">row["ORDERNUMBER"]</expression>
> </structure>
> <property name="repeatHeader">true</property>
> <property name="hideDetail">false</property>
> <property name="pageBreakAfter">auto</property>
> <property name="pageBreakBefore">auto</property>
> <property name="pageBreakInside">auto</property>
> <header>
> <row id="44">
> <cell id="45">
> <data id="56">
> <list-property name="visibility">
> <structure>
> <property name="format">all</property>
> <expression name="valueExpr"
> type="javascript">importPackage(Packages.java.io);&#13;
> out = new PrintWriter( new FileWriter( "c:/test/scrw2events.txt", true )
> );&#13;
> out.println( "vis test" + row["ORDERNUMBER"]);&#13;
> out.close();&#13;
> false</expression>
> </structure>
> </list-property>
> <method name="onPageBreak"><![CDATA[
> reportContext.setGlobalVariable("lst", this.getValue());
> reportContext.setGlobalVariable("dn", false);
>
> ]]></method>
> <property name="resultSetColumn">ORDERNUMBER</property>
> </data>
> </cell>
> <cell id="46"/>
> <cell id="47"/>
> <cell id="48"/>
> <cell id="49"/>
> </row>
> </header>
> <footer>
> <row id="50">
> <cell id="51"/>
> <cell id="52"/>
> <cell id="53"/>
> <cell id="54"/>
> <cell id="55"/>
> </row>
> </footer>
> </group>
> <detail>
> <row id="21">
> <cell id="22">
> <label id="73">
> <list-property name="visibility">
> <structure>
> <property name="format">all</property>
> <expression name="valueExpr" type="javascript">if((
> reportContext.getGlobalVariable("lst") == row["ORDERNUMBER"]) &amp;&amp;
> reportContext.getGlobalVariable("dn") == false){&#13;
> reportContext.setGlobalVariable("dn", true);&#13;
> false;&#13;
> }else{&#13;
> true;&#13;
> }</expression>
> </structure>
> </list-property>
> <text-property name="text">Continued</text-property>
> </label>
> </cell>
> <cell id="24">
> <data id="25">
> <property name="resultSetColumn">PRODUCTCODE</property>
> </data>
> </cell>
> <cell id="26">
> <data 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"/>
> <cell id="34"/>
> <cell id="35"/>
> <cell id="36"/>
> <cell id="37"/>
> </row>
> </footer>
> </table>
> </body>
> </report>
>
>
> On 11/24/2010 2:12 PM, birtdevsatwork@gmail.com wrote:
>> Is there an update to this fix, or has this been logged in bugzilla?
>> We are currently using 2.5.2 and the attached solution does not work. On
>> some of the continuation pages there is a record that prints at the top
>> of the page, before the "Continued" line. On other continuation pages
>> there is no "Continued" line. Also, in the pdf output there is never a
>> "Continued" line.
>> Any updates would be appreciated.
>> Thanks
>
Re: Checking repeated group header - BIRT 2.5.1 [message #646023 is a reply to message #641341] Tue, 21 December 2010 16:01 Go to previous messageGo to next message
Eclipse User is currently offline Eclipse UserFriend
Messages: 7
Registered: October 2010
Junior Member
We were able to simulate a continuation header via the master page and page variables. This was only a solution because we were not currently using the master page to produce and header for each page.

The only issue we had with this solution is that the report is only rendered properly via the webviewer. In addition to the continuation header we also are using page variables to print the page numbers in the footer of the master page, and reset the page number at the beginning of each group. This seems to work with one exception - all page breaks are not treated equally.

We are incrementing the page number in the onPageBreak script for the table. The value is incremented and displayed properly with the web viewer, but not the pdf. In the pdf it seems as though the only page breaks that are counted as breaks are the ones that I have set within the group. The "natural" page breaks do not trigger the onPageBreak script. These are the page breaks where the data overflows, within a particular section, from one page to the next.

Is this a known issue or are there any work arounds for this? Should I file a bug?

Thanks
Re: Checking repeated group header - BIRT 2.5.1 [message #646056 is a reply to message #646023] Tue, 21 December 2010 18:10 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

This is a known bug and should be fixed in 2.6.2 when it comes out. A
couple of things to try. Set the page break interval for the table to a
smaller number. You can also try setting the layout to auto instead of
fixed.

Jason

On 12/21/2010 11:01 AM, birtdevsatwork@gmail.com wrote:
> We were able to simulate a continuation header via the master page and
> page variables. This was only a solution because we were not currently
> using the master page to produce and header for each page.
>
> The only issue we had with this solution is that the report is only
> rendered properly via the webviewer. In addition to the continuation
> header we also are using page variables to print the page numbers in the
> footer of the master page, and reset the page number at the beginning of
> each group. This seems to work with one exception - all page breaks are
> not treated equally.
>
> We are incrementing the page number in the onPageBreak script for the
> table. The value is incremented and displayed properly with the web
> viewer, but not the pdf. In the pdf it seems as though the only page
> breaks that are counted as breaks are the ones that I have set within
> the group. The "natural" page breaks do not trigger the onPageBreak
> script. These are the page breaks where the data overflows, within a
> particular section, from one page to the next.
>
> Is this a known issue or are there any work arounds for this? Should I
> file a bug?
>
> Thanks
Previous Topic:Hidden Report Paremeter
Next Topic:Report engine / run and render problem
Goto Forum:
  


Current Time: Thu Apr 18 12:47:32 GMT 2024

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

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

Back to the top