Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Newbe issues(Grouped Page Breaking in PDF is wrong)
Newbe issues [message #629979] Thu, 30 September 2010 08:26 Go to next message
Chris  is currently offline Chris Friend
Messages: 47
Registered: September 2010
Member
Hi,

I have created a very simple report which lists country codes and the country name grouped alphabetically.

However the PDF version of the report page breaks after every 40 countries as well as at the end of a page. Thus page 1 has 40 countries
page 2 fits 36 countries
page 3 has the remaining 4 countries
page 4 has 32 countries
page 5 has the remaining 8 countries
etc

I have seen articles talking about a PDF page interval set at 40, but I can't find it anywhere.

I am using Eclipse BIRT Designer Version 2.5.2.v20100208 Build <2.5.2.v20100210-0630>.


<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.21" id="1">
<property name="author">Chris Larmer</property>
<property name="createdBy">Eclipse BIRT Designer Version 2.5.2.v20100208 Build &lt;2.5.2.v20100210-0630></property>
<text-property name="title">List of Country Codes</text-property>
<property name="units">in</property>
<property name="layoutPreference">auto layout</property>
<property name="bidiLayoutOrientation">ltr</property>
<property name="imageDPI">96</property>
<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source" id="45">
<text-property name="displayName"></text-property>
<list-property name="privateDriverProperties">
<ex-property>
<name>contentBidiFormatStr</name>
<value>ILYNN</value>
</ex-property>
<ex-property>
<name>metadataBidiFormatStr</name>
<value>ILYNN</value>
</ex-property>
</list-property>
<property name="odaDriverClass">org.postgresql.Driver</property>
<property name="odaURL">jdbc:postgresql://DevPCW7:5432/foundation</property>
<property name="odaUser">postgres</property>
<encrypted-property name="odaPassword" encryptionID="base64">WmFxMVhzdzI=</encrypted-property>
</oda-data-source>
</data-sources>
<data-sets>
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " name="Country" id="46">
<list-property name="columnHints">
<structure>
<property name="columnName">countrycode</property>
<text-property name="displayName">countrycode</text-property>
</structure>
<structure>
<property name="columnName">countryname</property>
<text-property name="displayName">countryname</text-property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">countrycode</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">countryname</property>
<property name="dataType">string</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">countrycode</property>
<property name="nativeName">countrycode</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">countryname</property>
<property name="nativeName">countryname</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
</list-property>
<xml-property name="queryText"><![CDATA[select usermgmt.tblcountries.countrycode,
usermgmt.tblcountries.countryname
from usermgmt.tblcountries]]></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>countrycode</design:name>
<design:position>1</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>2</design:precision>
<design:scale>0</design:scale>
<design:nullability>NotNullable</design:nullability>
<design:uiHints>
<design:displayName>countrycode</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>countrycode</design:label>
<design:formattingHints>
<design:displaySize>2</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>countryname</design:name>
<design:position>2</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>100</design:precision>
<design:scale>0</design:scale>
<design:nullability>NotNullable</design:nullability>
<design:uiHints>
<design:displayName>countryname</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>countryname</design:label>
<design:formattingHints>
<design:displaySize>100</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
</design:resultSetColumns>
<design:criteria/>
</design:resultSetDefinitions>
</design:ResultSets>
</model:DesignValues>
]]></xml-property>
</oda-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">sans-serif</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab-cell" id="5">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab" id="6">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<property name="type">a4</property>
<property name="orientation">portrait</property>
<property name="headerHeight">0in</property>
<page-footer>
<grid id="7">
<property name="height">0.5104166666666666in</property>
<column id="8"/>
<row id="9">
<property name="height">0.010416666666666666in</property>
<cell id="10"/>
</row>
<row id="11">
<property name="height">0.28125in</property>
<cell id="12">
<grid id="24">
<property name="borderTopColor">#000000</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">medium</property>
<property name="height">0.2708333333333333in</property>
<column id="25"/>
<column id="26"/>
<column id="27"/>
<row id="28">
<property name="height">0.2708333333333333in</property>
<cell id="29">
<text id="44">
<property name="display">block</property>
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<FONT size="2" color="blue" >P</FONT><FONT size="2" color="black" >rocuright 100.0</FONT>]]></text-property>
</text>
</cell>
<cell id="30">
<grid id="32">
<property name="width">2.53125in</property>
<column id="33">
<property name="width">1.09375in</property>
</column>
<column id="34">
<property name="width">0.13541666666666666in</property>
</column>
<column id="35">
<property name="width">1.3020833333333333in</property>
</column>
<row id="36">
<cell id="37">
<auto-text id="38">
<property name="textAlign">right</property>
<property name="type">page-number</property>
</auto-text>
</cell>
<cell id="39">
<text id="40">
<property name="textAlign">center</property>
<property name="contentType">plain</property>
<text-property name="content"><![CDATA[/]]></text-property>
</text>
</cell>
<cell id="41">
<auto-text id="42">
<property name="textAlign">left</property>
<property name="type">total-page</property>
</auto-text>
</cell>
</row>
</grid>
</cell>
<cell id="31">
<text id="43">
<property name="textAlign">right</property>
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<value-of>new Date()</value-of>]]></text-property>
</text>
</cell>
</row>
</grid>
</cell>
</row>
<row id="13">
<property name="height">0.21875in</property>
<cell id="14">
<text id="47">
<text-property name="content"><![CDATA[Filename: C:\temp\Procuright\Country List.rptdesign]]></text-property>
</text>
</cell>
</row>
</grid>
</page-footer>
</simple-master-page>
</page-setup>
<body>
<label id="96">
<property name="fontSize">14pt</property>
<property name="fontWeight">bold</property>
<property name="textAlign">left</property>
<text-property name="text">List of Country Codes</text-property>
</label>
<table id="65">
<property name="width">7.947916666666667in</property>
<property name="dataSet">Country</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">countrycode</property>
<text-property name="displayName">countrycode</text-property>
<expression name="expression" type="javascript">" " +dataSetRow["countrycode"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">countryname</property>
<text-property name="displayName">countryname</text-property>
<expression name="expression" type="javascript">dataSetRow["countryname"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">Aggregation</property>
<text-property name="displayName">NumberofCountries</text-property>
<property name="dataType">integer</property>
<property name="aggregateFunction">COUNT</property>
<list-property name="arguments">
<structure>
<property name="name">Expression</property>
<expression name="value" type="javascript">row["countryname"]</expression>
</structure>
</list-property>
</structure>
<structure>
<property name="name">CountryGp</property>
<property name="dataType">integer</property>
<simple-property-list name="aggregateOn">
<value>Alphabet</value>
</simple-property-list>
<property name="aggregateFunction">COUNT</property>
<list-property name="arguments">
<structure>
<property name="name">Expression</property>
<expression name="value" type="javascript">row["countryname"]</expression>
</structure>
</list-property>
</structure>
</list-property>
<list-property name="sort">
<structure>
<expression name="key" type="javascript">row["countryname"]</expression>
<property name="direction">asc</property>
<property name="strength">-1</property>
</structure>
</list-property>
<column id="95">
<property name="width">0.7395833333333334in</property>
</column>
<column id="79">
<property name="width">1in</property>
</column>
<column id="80">
<property name="width">6.208333333333333in</property>
</column>
<header>
<row id="66">
<cell id="90"/>
<cell id="67">
<label id="68">
<property name="textAlign">left</property>
<text-property name="text">Country Code</text-property>
</label>
</cell>
<cell id="69">
<label id="70">
<property name="textAlign">left</property>
<text-property name="text">Country</text-property>
</label>
</cell>
</row>
</header>
<group id="81">
<property name="groupName">Alphabet</property>
<property name="interval">none</property>
<property name="sortDirection">asc</property>
<expression name="keyExpr" type="javascript">BirtStr.left(row["countryname"])</expression >
<structure name="toc"/>
<property name="repeatHeader">true</property>
<property name="hideDetail">false</property>
<property name="pageBreakAfter">avoid</property>
<property name="pageBreakBefore">avoid</property>
<property name="pageBreakInside">avoid</property>
<header>
<row id="82">
<cell id="91">
<text-data id="89">
<property name="fontSize">12pt</property>
<property name="fontWeight">bold</property>
<property name="textAlign">left</property>
<expression name="valueExpr">BirtStr.left(row["countryname"])</expression >
<property name="contentType">html</property>
</text-data>
</cell>
<cell id="83"/>
<cell id="84"/>
</row>
</header>
<footer>
<row id="85">
<property name="height">0.3958333333333333in</property>
<cell id="93">
<property name="colSpan">1</property>
<property name="rowSpan">1</property>
</cell>
<cell id="100">
<label id="101">
<property name="fontWeight">bold</property>
<text-property name="text">Number of countries</text-property>
</label>
</cell>
<cell id="87">
<data id="102">
<property name="fontSize">10pt</property>
<property name="fontWeight">bold</property>
<property name="resultSetColumn">CountryGp</property>
</data>
</cell>
</row>
</footer>
</group>
<detail>
<row id="71">
<cell id="92"/>
<cell id="72">
<data id="73">
<property name="textAlign">left</property>
<property name="resultSetColumn">countrycode</property>
</data>
</cell>
<cell id="74">
<data id="75">
<property name="textAlign">left</property>
<property name="resultSetColumn">countryname</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="76">
<property name="height">0.5520833333333334in</property>
<cell id="94">
<property name="colSpan">2</property>
<property name="rowSpan">1</property>
<label id="97">
<property name="fontSize">12pt</property>
<text-property name="text">Total Number of Countries</text-property>
</label>
</cell>
<cell id="78">
<data id="99">
<property name="fontSize">12pt</property>
<property name="fontWeight">bold</property>
<property name="resultSetColumn">Aggregation</property>
</data>
</cell>
</row>
</footer>
</table>
</body>
</report>
Re: Newbe issues [message #630033 is a reply to message #629979] Thu, 30 September 2010 12:56 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 212
Registered: July 2009
Location: Houston TX
Senior Member

The page break interval is a property of the Table object.
Select your table (either in the Outline view or on the layout canvas by hovering at the lower left hand corner) then go to its Properties tab. You'll see a subtab for Page Break.
Re: Newbe issues [message #630188 is a reply to message #630033] Thu, 30 September 2010 23:32 Go to previous messageGo to next message
Chris  is currently offline Chris Friend
Messages: 47
Registered: September 2010
Member
Thanks Richard,
now to work out how to
1. fill out each page to stop it have a new page if the whole group will no fit on the page and
2. How to reprint the group header if it goes over the page.
Re: Newbe issues [message #630191 is a reply to message #630188] Fri, 01 October 2010 01:07 Go to previous messageGo to next message
Chris  is currently offline Chris Friend
Messages: 47
Registered: September 2010
Member
I have been playing with
a) Fixed Layouts and
b)Page break interval.

How do I get the report to fill out each page from the top to the bottom, ie no blank areas.

Page break before, after and inside only have the options of Avoid or Auto. There is no option to not page break. Is there any explanation of how Auto and Avoid work.

With Auto Layouts I managed at one point to have the report breaking over a group and saw that it automatically reprinter the heading. However it did it for only one group and still left some pages with white space at the bottom.

Thanks for your help
Re: Newbe issues [message #630193 is a reply to message #629979] Fri, 01 October 2010 01:13 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 212
Registered: July 2009
Location: Houston TX
Senior Member

In the table, click on each of the group headers and right click on Edit Group. Then look to see what the group page break settings are.
Re: Newbe issues [message #630194 is a reply to message #629979] Fri, 01 October 2010 01:30 Go to previous messageGo to next message
Chris  is currently offline Chris Friend
Messages: 47
Registered: September 2010
Member
Thanks Richard,

I have set all the group page break settings to Auto. These are the settings I have been playing with.

However what does Auto mean and what does Avoid mean.
Where can I find what behavior and rules are set for Auto, and what rules are set for Avoid.

In Crystal, I could set page breaking to look after widows and orphan first and last lines.

When I have a group with 20 lines, but there is space for 5 on one page I would like it to print the first 5 on that page and the rest on the next page, rather than putting all 20 on a new page.

I'm just trying to sort out these issues so that I understand how BIRT works.
Re: Newbe issues [message #630195 is a reply to message #630194] Fri, 01 October 2010 01:40 Go to previous message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 212
Registered: July 2009
Location: Houston TX
Senior Member

Remember that Crystal is a page-oriented report package where BIRT is a web-oriented package. Crystal has a lot of logic (such as widow and orphan calculations) that is not (nor will it be) in BIRT.

That said, I assume there's a document somewhere describing the difference between Auto and Avoid. (Avoid means that the emitter - or web viewer - should attempt to avoid having a page break at the indicated position. Depending on the data rows and selected options, avoid cannot always be enforced.)

>> When I have a group with 20 lines, but there is space for 5
>> on one page I would like it to print the first 5 on that page
>> and the rest on the next page, rather than
>> putting all 20 on a new page.

That's how I would expect the report to behave, and I certainly have reports that work that way. If the Edit Group has page break set to Avoid, then you'd see BIRT trying to keep all 20 together.
Previous Topic:Error accesing java classes from a scripted dataset
Next Topic:Birt Customize
Goto Forum:
  


Current Time: Sat Apr 20 00:35:27 GMT 2024

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

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

Back to the top