Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 138253 Details for
Bug 202438
[Improve Page Break Management] Create a total page number per group
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Test for page variable page number not on first page
pv_paged_grouptst.rptdesign (text/plain), 27.57 KB, created by
Lourens van Nieuwenhuizen
on 2009-06-04 03:04:27 EDT
(
hide
)
Description:
Test for page variable page number not on first page
Filename:
MIME Type:
Creator:
Lourens van Nieuwenhuizen
Created:
2009-06-04 03:04:27 EDT
Size:
27.57 KB
patch
obsolete
><?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.0.v20090520 Build <2.5.0.v20090526-0630></property> > <property name="units">in</property> > <method name="onPageStart"><![CDATA[ var groups = this.getInstancesByElementName("GROUP_STATUS"); > var group = groups[0]; > var groupKey = group.value; > var prevGroupKey = reportContext.getPageVariable("GROUP_NAME"); > var groupPageNumber = reportContext.getPageVariable("GROUP_PAGE"); > > if (groupPageNumber == null) > { > groupPageNumber = 1; > } > > if (prevGroupKey == null) > { > reportContext.setPageVariable("GROUP_NAME", groupKey); > } > > reportContext.setPageVariable("GROUP_PAGE", groupPageNumber);]]></method> > <method name="onPageEnd"><![CDATA[ > var groups = this.getInstancesByElementName("GROUP_STATUS"); > var group = groups[0]; > var groupKey = group.value; > var prevGroupKey = reportContext.getPageVariable("GROUP_NAME"); > var groupPageNumber = reportContext.getPageVariable("GROUP_PAGE"); > if (prevGroupKey == groupKey) > { > if (groupPageNumber != null) > { > groupPageNumber = groupPageNumber.intValue() + 1; > } > else { > groupPageNumber = 1; > } > } > else { > groupPageNumber = 1; > } > reportContext.setPageVariable("GROUP_NAME", groupKey); > reportContext.setPageVariable("GROUP_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">auto 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> > <property name="displayName">ORDERNUMBER</property> > </structure> > <structure> > <property name="columnName">ORDERDATE</property> > <property name="displayName">ORDERDATE</property> > </structure> > <structure> > <property name="columnName">REQUIREDDATE</property> > <property name="displayName">REQUIREDDATE</property> > </structure> > <structure> > <property name="columnName">SHIPPEDDATE</property> > <property name="displayName">SHIPPEDDATE</property> > </structure> > <structure> > <property name="columnName">STATUS</property> > <property name="displayName">STATUS</property> > </structure> > <structure> > <property name="columnName">COMMENTS</property> > <property name="displayName">COMMENTS</property> > </structure> > <structure> > <property name="columnName">CUSTOMERNUMBER</property> > <property name="displayName">CUSTOMERNUMBER</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> > </styles> > <page-setup> > <simple-master-page name="Simple MasterPage" id="2"> > <property name="orientation">landscape</property> > <property name="leftMargin">0.25in</property> > <page-header> > <grid id="74"> > <column id="75"/> > <column id="76"/> > <row id="78"> > <cell id="79"> > <auto-text id="82"> > <property name="textUnderline">underline</property> > <property name="type">page-number</property> > </auto-text> > </cell> > <cell id="80"> > <auto-text id="83"> > <property name="textUnderline">underline</property> > <property name="type">page-variable</property> > <property name="pageVariable">GROUP_NAME</property> > </auto-text> > <auto-text id="84"> > <property name="textUnderline">underline</property> > <property name="type">page-variable</property> > <property name="pageVariable">GROUP_PAGE</property> > </auto-text> > <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> > </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="dataSet">Data Set</property> > <list-property name="boundDataColumns"> > <structure> > <property name="name">ORDERNUMBER</property> > <property name="displayName">ORDERNUMBER</property> > <expression name="expression">dataSetRow["ORDERNUMBER"]</expression> > <property name="dataType">integer</property> > </structure> > <structure> > <property name="name">ORDERDATE</property> > <property name="displayName">ORDERDATE</property> > <expression name="expression">dataSetRow["ORDERDATE"]</expression> > <property name="dataType">date</property> > </structure> > <structure> > <property name="name">REQUIREDDATE</property> > <property name="displayName">REQUIREDDATE</property> > <expression name="expression">dataSetRow["REQUIREDDATE"]</expression> > <property name="dataType">date</property> > </structure> > <structure> > <property name="name">SHIPPEDDATE</property> > <property name="displayName">SHIPPEDDATE</property> > <expression name="expression">dataSetRow["SHIPPEDDATE"]</expression> > <property name="dataType">date</property> > </structure> > <structure> > <property name="name">STATUS</property> > <property name="displayName">STATUS</property> > <expression name="expression">dataSetRow["STATUS"]</expression> > <property name="dataType">string</property> > </structure> > <structure> > <property name="name">COMMENTS</property> > <property name="displayName">COMMENTS</property> > <expression name="expression">dataSetRow["COMMENTS"]</expression> > <property name="dataType">string</property> > </structure> > <structure> > <property name="name">CUSTOMERNUMBER</property> > <property name="displayName">CUSTOMERNUMBER</property> > <expression name="expression">dataSetRow["CUSTOMERNUMBER"]</expression> > <property name="dataType">integer</property> > </structure> > </list-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">NewTableGroup1</property> > <property name="interval">none</property> > <property name="sortDirection">asc</property> > <expression name="keyExpr">row["STATUS"]</expression> > <structure name="toc"> > <expression name="expressionValue">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"> > <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"/> > <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>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 202438
:
135948
|
136790
|
136794
|
136963
| 138253