Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Birt 2.5.2 : Number of page
Birt 2.5.2 : Number of page [message #557926] Thu, 09 September 2010 08:55 Go to next message
No real name is currently offline No real name
Messages: 4
Registered: September 2010
Junior Member
Hi,

In my report, I want to write number of pages per group (in the footer of each group) like this :

Group 1 : Page 1/3, 2/3, 3/3
Group 2 : Page 1/4, 2/4, 3/4, 4/4

I've tried a lot of things without success

Could you please help me ?
Thank you in advance,
Re: Birt 2.5.2 : Number of page [message #558001 is a reply to message #557926] Thu, 09 September 2010 13:41 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Group footers do not show up on every page. You can do this if you set
the page break interval, and put the page number in the header footer of
the page. Take a look at the attached example. Look at the scripts
node in the outline view. A couple of scripts are used. Also note that
the run and render task need to be separated. If you are using the
viewer this is the default.

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>
<method name="beforeFactory"><![CDATA[prevGroupKey = "";
groupPageNumber = 1;
reportContext.setGlobalVariable("gGROUP_NAME", "");
reportContext.setGlobalVariable("gGROUP_PAGE", 1);
]]></method>
<method name="onPageEnd"><![CDATA[ //Only works in 2.6
//var groups = this.getInstancesByElementName("GROUP_STATUS");
//var groups = this.getInstancesByElementId(73);
//var group;
//group = groups[0];
//var groupKey = group.value;
var groupKey = reportContext.getGlobalVariable("CurrentGroup");


var prevGroupKey = reportContext.getGlobalVariable("gGROUP_NAME");
var groupPageNumber = reportContext.getGlobalVariable("gGROUP_PAGE");
if( prevGroupKey == null ){
prevGroupKey = "";
}
//prevGroupKey = reportContext.getPageVariable("GROUP_NAME");
//groupPageNumber = reportContext.getPageVariable("GROUP_PAGE");

if (prevGroupKey == groupKey)
{
if (groupPageNumber != null)
{
groupPageNumber = parseInt(groupPageNumber) + 1;
}
else {
groupPageNumber = 1;
}
}
else {
groupPageNumber = 1;
prevGroupKey = groupKey;
}
reportContext.setPageVariable("GROUP_NAME", groupKey);
reportContext.setPageVariable("GROUP_PAGE", groupPageNumber);
reportContext.setGlobalVariable("gGROUP_NAME", groupKey);
reportContext.setGlobalVariable("gGROUP_PAGE", groupPageNumber);


var groupTotalPage = reportContext.getPageVariable("GROUP_TOTAL_PAGE");
if (groupTotalPage == null)
{
groupTotalPage = new java.util.HashMap();
reportContext.setPageVariable("GROUP_TOTAL_PAGE", groupTotalPage);
}
groupTotalPage.put(groupKey, groupPageNumber);
]]></method>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="layoutPreference">fixed layout</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="9">
<list-property name="columnHints">
<structure>
<property name="columnName">ORDERNUMBER</property>
<text-property
name="displayName">ORDERNUMBER</text-property>
</structure>
<structure>
<property name="columnName">ORDERDATE</property>
<text-property
name="displayName">ORDERDATE</text-property>
</structure>
<structure>
<property name="columnName">REQUIREDDATE</property>
<text-property
name="displayName">REQUIREDDATE</text-property>
</structure>
<structure>
<property name="columnName">SHIPPEDDATE</property>
<text-property
name="displayName">SHIPPEDDATE</text-property>
</structure>
<structure>
<property name="columnName">STATUS</property>
<text-property
name="displayName">STATUS</text-property>
</structure>
<structure>
<property name="columnName">COMMENTS</property>
<text-property
name="displayName">COMMENTS</text-property>
</structure>
<structure>
<property name="columnName">CUSTOMERNUMBER</property>
<text-property
name="displayName">CUSTOMERNUMBER</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">ORDERDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">REQUIREDDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">SHIPPEDDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">STATUS</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">6</property>
<property name="name">COMMENTS</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">7</property>
<property name="name">CUSTOMERNUMBER</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">ORDERDATE</property>
<property name="nativeName">ORDERDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">REQUIREDDATE</property>
<property name="nativeName">REQUIREDDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">SHIPPEDDATE</property>
<property name="nativeName">SHIPPEDDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">STATUS</property>
<property name="nativeName">STATUS</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">6</property>
<property name="name">COMMENTS</property>
<property name="nativeName">COMMENTS</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">7</property>
<property name="name">CUSTOMERNUMBER</property>
<property name="nativeName">CUSTOMERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
</list-property>
<xml-property name="queryText"><![CDATA[select *
from CLASSICMODELS.ORDERS]]></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>ORDERDATE</design:name>
<design:position>2</design:position>
<design:nativeDataTypeCode>91</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERDATE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERDATE</design:label>
<design:formattingHints>
<design:displaySize>10</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>REQUIREDDATE</design:name>
<design:position>3</design:position>
<design:nativeDataTypeCode>91</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>REQUIREDDATE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>REQUIREDDATE</design:label>
<design:formattingHints>
<design:displaySize>10</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>SHIPPEDDATE</design:name>
<design:position>4</design:position>
<design:nativeDataTypeCode>91</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>SHIPPEDDATE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>SHIPPEDDATE</design:label>
<design:formattingHints>
<design:displaySize>10</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>STATUS</design:name>
<design:position>5</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>STATUS</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>STATUS</design:label>
<design:formattingHints>
<design:displaySize>15</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>COMMENTS</design:name>
<design:position>6</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>32700</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>COMMENTS</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>COMMENTS</design:label>
<design:formattingHints>
<design:displaySize>32700</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>CUSTOMERNUMBER</design:name>
<design:position>7</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>CUSTOMERNUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>CUSTOMERNUMBER</design:label>
<design:formattingHints>
<design:displaySize>11</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">"Verdana"</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>
<style name="table-header" id="97">
<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="98">
<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="99">
<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="100">
<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="101">
<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="102">
<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="103">
<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="104">
<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="105">
<property name="color">orange</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<page-header>
<grid id="74">
<column id="75"/>
<column id="76"/>
<row id="78">
<property name="style">special-header</property>
<cell id="79">
<auto-text id="83">
<property
name="textUnderline">underline</property>
<property
name="type">page-variable</property>
<property
name="pageVariable">GROUP_NAME</property>
</auto-text>
</cell>
<cell id="80">
<grid id="88">
<property name="width">2.125in</property>
<column id="89">
<property
name="width">0.25in</property>
</column>
<column id="95">
<property name="width">0.1in</property>
</column>
<column id="90">
<property
name="width">0.25in</property>
</column>
<row id="91">
<cell id="92">
<auto-text id="84">
<property
name="textUnderline">none</property>
<property
name="type">page-variable</property>
<property
name="pageVariable">GROUP_PAGE</property>
</auto-text>
</cell>
<cell id="94">
<label id="96">
<text-property name="text">
of</text-property>
</label>
</cell>
<cell id="93">
<auto-text id="87">
<method
name="onRender"><![CDATA[
var totalPage = reportContext.getPageVariable("GROUP_TOTAL_PAGE");
var groupName = reportContext.getPageVariable("GROUP_NAME");
if (totalPage != null)
{
this.text = java.lang.Integer.toString(totalPage.get(groupName));
}
]]></method>
<property
name="type">page-variable</property>
<property
name="pageVariable">GROUP_TOTAL_PAGE</property>
</auto-text>
</cell>
</row>
</grid>
</cell>
</row>
</grid>
</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="10">
<property name="masterPage">Simple MasterPage</property>
<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">ORDERDATE</property>
<text-property
name="displayName">ORDERDATE</text-property>
<expression
name="expression">dataSetRow["ORDERDATE"]</expression>
<property name="dataType">date</property>
</structure>
<structure>
<property name="name">REQUIREDDATE</property>
<text-property
name="displayName">REQUIREDDATE</text-property>
<expression
name="expression">dataSetRow["REQUIREDDATE"]</expression >
<property name="dataType">date</property>
</structure>
<structure>
<property name="name">SHIPPEDDATE</property>
<text-property
name="displayName">SHIPPEDDATE</text-property>
<expression
name="expression">dataSetRow["SHIPPEDDATE"]</expression >
<property name="dataType">date</property>
</structure>
<structure>
<property name="name">STATUS</property>
<text-property
name="displayName">STATUS</text-property>
<expression
name="expression">dataSetRow["STATUS"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">COMMENTS</property>
<text-property
name="displayName">COMMENTS</text-property>
<expression
name="expression">dataSetRow["COMMENTS"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">CUSTOMERNUMBER</property>
<text-property
name="displayName">CUSTOMERNUMBER</text-property>
<expression
name="expression">dataSetRow["CUSTOMERNUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
</list-property>
<property name="pageBreakInterval">30</property>
<column id="49"/>
<column id="50"/>
<column id="51"/>
<column id="52"/>
<column id="53"/>
<column id="54"/>
<column id="55"/>
<header>
<row id="11">
<cell id="12">
<label id="13">
<text-property
name="text">ORDERNUMBER</text-property>
</label>
</cell>
<cell id="14">
<label id="15">
<text-property
name="text">ORDERDATE</text-property>
</label>
</cell>
<cell id="16">
<label id="17">
<text-property
name="text">REQUIREDDATE</text-property>
</label>
</cell>
<cell id="18">
<label id="19">
<text-property
name="text">SHIPPEDDATE</text-property>
</label>
</cell>
<cell id="20">
<label id="21">
<text-property
name="text">STATUS</text-property>
</label>
</cell>
<cell id="22">
<label id="23">
<text-property
name="text">COMMENTS</text-property>
</label>
</cell>
<cell id="24">
<label id="25">
<text-property
name="text">CUSTOMERNUMBER</text-property>
</label>
</cell>
</row>
</header>
<group id="56">
<property name="groupName">STATUS</property>
<property name="interval">none</property>
<property name="sortDirection">asc</property>
<expression name="keyExpr"
type="javascript">row["STATUS"]</expression>
<structure name="toc">
<expression name="expressionValue"
type="javascript">row["STATUS"]</expression>
</structure>
<property name="repeatHeader">true</property>
<property name="hideDetail">false</property>
<property name="pageBreakAfter">auto</property>
<property
name="pageBreakBefore">always-excluding-first</property>
<property name="pageBreakInside">auto</property>
<header>
<row id="57">
<method
name="onCreate"><![CDATA[reportContext.setGlobalVariable("CurrentGroup ",this.getRowData().getColumnValue("STATUS"));]]></method >
<cell id="58">
<data name="GROUP_STATUS" id="73">
<property
name="resultSetColumn">STATUS</property>
</data>
</cell>
<cell id="59"/>
<cell id="60"/>
<cell id="61"/>
<cell id="62"/>
<cell id="63"/>
<cell id="64"/>
</row>
</header>
<footer>
<row id="65">
<cell id="66">
<label id="107">
<text-property
name="text">myfooter</text-property>
</label>
</cell>
<cell id="67"/>
<cell id="68"/>
<cell id="69"/>
<cell id="70"/>
<cell id="71"/>
<cell id="72"/>
</row>
</footer>
</group>
<detail>
<row id="26">
<cell id="27">
<data id="28">
<property
name="resultSetColumn">ORDERNUMBER</property>
</data>
</cell>
<cell id="29">
<data id="30">
<property
name="resultSetColumn">ORDERDATE</property>
</data>
</cell>
<cell id="31">
<data id="32">
<property
name="resultSetColumn">REQUIREDDATE</property>
</data>
</cell>
<cell id="33">
<data id="34">
<property
name="resultSetColumn">SHIPPEDDATE</property>
</data>
</cell>
<cell id="35">
<data id="36">
<property
name="resultSetColumn">STATUS</property>
</data>
</cell>
<cell id="37">
<data id="38">
<property
name="resultSetColumn">COMMENTS</property>
</data>
</cell>
<cell id="39">
<data id="40">
<property
name="resultSetColumn">CUSTOMERNUMBER</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="41">
<cell id="42"/>
<cell id="43"/>
<cell id="44"/>
<cell id="45"/>
<cell id="46"/>
<cell id="47"/>
<cell id="48"/>
</row>
</footer>
</table>
</body>
<property name="pageVariables">
<variable-element name="GROUP_NAME">
<property name="type">page</property>
</variable-element>
<variable-element name="GROUP_PAGE">
<property name="type">page</property>
</variable-element>
<variable-element name="GROUP_TOTAL_PAGE">
<property name="type">report</property>
</variable-element>
</property>
</report>


On 9/9/2010 8:55 AM, sylvie.lepage@groupe-asten.fr wrote:
> Hi,
>
> In my report, I want to write number of pages per group (in the footer
> of each group) like this :
>
> Group 1 : Page 1/3, 2/3, 3/3
> Group 2 : Page 1/4, 2/4, 3/4, 4/4
>
> I've tried a lot of things without success
>
> Could you please help me ?
> Thank you in advance,
Re: Birt 2.5.2 : Number of page [message #558196 is a reply to message #558001] Fri, 10 September 2010 09:43 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 4
Registered: September 2010
Junior Member
Hello Jason,

Thanks for your reply.

But it doesn't work ... its allways '1/1'.

I'm trying to correct the scripts but I can't do it.
I think there is a problem with Pagevariable and Globalvariable in the scripts ....

Can you help me again please ?
Re: Birt 2.5.2 : Number of page [message #558229 is a reply to message #558196] Fri, 10 September 2010 11:32 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 4
Registered: September 2010
Junior Member
Jason,

It's finally OK, there was an error on the variable CurrentGroup.

So, it's OK with the Viewer and in PDF since the Viewer, but not correct straight in PDF.

Thanks a lot.
Re: Birt 2.5.2 : Number of page [message #558237 is a reply to message #558229] Fri, 10 September 2010 11:44 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Page scripts currently do not work if going straight to pdf. From an
API standpoint you have to have a runtask then a rendertask. You could
use the /frameset mapping in the viewer and then add the __format=pdf to
the url which would skip the rendering to html and render directly to pdf.

Jason

On 9/10/2010 11:32 AM, sylvie.lepage@groupe-asten.fr wrote:
> Jason,
>
> It's finally OK, there was an error on the variable CurrentGroup.
>
> So, it's OK with the Viewer and in PDF since the Viewer, but not correct
> straight in PDF.
>
> Thanks a lot.
Re: Birt 2.5.2 : Number of page [message #558244 is a reply to message #558237] Fri, 10 September 2010 12:05 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 4
Registered: September 2010
Junior Member
Jason,

OK

Thanks for all ...
Re: Birt 2.5.2 : Number of page [message #1124357 is a reply to message #558244] Thu, 03 October 2013 09:01 Go to previous messageGo to next message
Mihir Gajjar is currently offline Mihir Gajjar
Messages: 3
Registered: October 2013
Junior Member
I am stuck in the same issue but we are using BIRT 2.5.1. has anybody solved this for BIRT 2.5.1 ?
Please guide / suggest.
Thank you.
Re: Birt 2.5.2 : Number of page [message #1142704 is a reply to message #1124357] Thu, 17 October 2013 16:14 Go to previous message
Michael Williams is currently offline Michael Williams
Messages: 1547
Registered: July 2009
Senior Member

Take a look at this example from the BIRT Exchange devShare:

BIRT Exchange DevShare - Group Page Numbering


Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Previous Topic:How to overlap report items in BIRT?
Next Topic:Getting an rptdocument file from the URL call
Goto Forum:
  


Current Time: Fri Aug 01 18:34:45 EDT 2014

Powered by FUDForum. Page generated in 0.02073 seconds