Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Create Report with a Title Page
Create Report with a Title Page [message #651873] Tue, 01 February 2011 20:42 Go to next message
Steve Bliss is currently offline Steve Bliss
Messages: 15
Registered: February 2011
Junior Member
Hopefully this is a simple question, but I've not been able to find an answer by searching the web --

How do I set up a report so the first page has one layout, and all following pages have a different layout? I assume this involves multiple masterpages, but I haven't found how to control masterpage selection by page number.

If it matters, I'm still developing in BIRT 2.3.1.

Re: Create Report with a Title Page [message #651881 is a reply to message #651873] Tue, 01 February 2011 21:04 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

You can create multiple masterpages and then in Page Break property for
a report element set the master page property for the report item.

Jason

On 2/1/2011 3:42 PM, steve.bliss@amway.com wrote:
> Hopefully this is a simple question, but I've not been able to find an
> answer by searching the web --
>
> How do I set up a report so the first page has one layout, and all
> following pages have a different layout? I assume this involves multiple
> masterpages, but I haven't found how to control masterpage selection by
> page number.
>
> If it matters, I'm still developing in BIRT 2.3.1.
>
>
Re: Create Report with a Title Page [message #651889 is a reply to message #651881] Tue, 01 February 2011 21:59 Go to previous messageGo to next message
Steve Bliss is currently offline Steve Bliss
Messages: 15
Registered: February 2011
Junior Member
Jason Weathersby wrote on Tue, 01 February 2011 16:04
You can create multiple masterpages and then in Page Break property for
a report element set the master page property for the report item.



I tried that, I set the Page Break / Master Page property for an element near the beginning of the report design to my 'second page' masterpage - but it forced an immediate page break at that element, instead of continuing the flow on page 1.

Is there a way to select one masterpage for page 1, and a different masterpage for pages 2+?

Thanks,
Steve

Re: Create Report with a Title Page [message #652107 is a reply to message #651889] Wed, 02 February 2011 17:06 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

One way to do this, if you want the master page to change in a table, is
to add a computed column to the dataset that does a running row count.
Bind a table to the dataset and then filter the table for the row count
less than a value (value should match your page break inveral). Set its
master page to the first master page.

Add a second table that is bound to the same dataset and filter it for
the row count > than the page break interval. Set its master page to
the second master page. See attached report.

Jason

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.22"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.6.1.v20100902 Build &lt;2.6.1.v20100915-1750></property>
<property name="units">in</property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<property name="imageDPI">96</property>
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
id="7">
<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.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="computedColumns">
<structure>
<property name="name">rwc</property>
<property name="dataType">integer</property>
<property
name="aggregateFunction">RUNNINGCOUNT</property>
<list-property name="arguments">
<structure>
<property name="name">Expression</property>
<expression
name="value">row["ORDERLINENUMBER"]</expression>
</structure>
</list-property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">ORDERNUMBER</property>
<text-property
name="displayName">ORDERNUMBER</text-property>
<text-property
name="heading">ORDERNUMBER</text-property>
<property name="displayLength">11</property>
<property name="horizontalAlign">justify</property>
<property name="wordWrap">false</property>
</structure>
<structure>
<property name="columnName">PRODUCTCODE</property>
<text-property
name="displayName">PRODUCTCODE</text-property>
<text-property
name="heading">PRODUCTCODE</text-property>
<property name="displayLength">15</property>
<property name="horizontalAlign">justify</property>
<property name="wordWrap">false</property>
</structure>
<structure>
<property name="columnName">QUANTITYORDERED</property>
<text-property
name="displayName">QUANTITYORDERED</text-property>
<text-property
name="heading">QUANTITYORDERED</text-property>
<property name="displayLength">11</property>
<property name="horizontalAlign">justify</property>
<property name="wordWrap">false</property>
</structure>
<structure>
<property name="columnName">PRICEEACH</property>
<text-property
name="displayName">PRICEEACH</text-property>
<text-property name="heading">PRICEEACH</text-property>
<property name="displayLength">22</property>
<property name="horizontalAlign">justify</property>
<property name="wordWrap">false</property>
</structure>
<structure>
<property name="columnName">ORDERLINENUMBER</property>
<text-property
name="displayName">ORDERLINENUMBER</text-property>
<text-property
name="heading">ORDERLINENUMBER</text-property>
<property name="displayLength">6</property>
<property name="horizontalAlign">justify</property>
<property name="wordWrap">false</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>
<structure>
<property name="position">6</property>
<property name="name">rwc</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="nativeName">ORDERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="nativeName">PRODUCTCODE</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="nativeName">QUANTITYORDERED</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="nativeName">PRICEEACH</property>
<property name="dataType">float</property>
<property name="nativeDataType">8</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="nativeName">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">5</property>
</structure>
</list-property>
<xml-property name="queryText"><![CDATA[select *
from orderdetails]]></xml-property>
<xml-property name="designerValues"><![CDATA[<?xml
version="1.0" encoding="UTF-8"?>
<model:DesignValues
xmlns:design="http://www.eclipse.org/datatools/connectivity/oda/design"
xmlns:model="http://www.eclipse.org/birt/report/model/adapter/odaModel">
<Version>1.0</Version>
<design:ResultSets derivedMetaData="true">
<design:resultSetDefinitions>
<design:resultSetColumns>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERNUMBER</design:name>
<design:position>1</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERNUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERNUMBER</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>PRODUCTCODE</design:name>
<design:position>2</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>PRODUCTCODE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>PRODUCTCODE</design:label>
<design:formattingHints>
<design:displaySize>15</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>QUANTITYORDERED</design:name>
<design:position>3</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>QUANTITYORDERED</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>QUANTITYORDERED</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>PRICEEACH</design:name>
<design:position>4</design:position>
<design:nativeDataTypeCode>8</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>PRICEEACH</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>PRICEEACH</design:label>
<design:formattingHints>
<design:displaySize>22</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERLINENUMBER</design:name>
<design:position>5</design:position>
<design:nativeDataTypeCode>5</design:nativeDataTypeCode>
<design:precision>5</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERLINENUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERLINENUMBER</design:label>
<design:formattingHints>
<design:displaySize>6</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
</design:resultSetColumns>
<design:criteria/>
</design:resultSetDefinitions>
</design:ResultSets>
</model:DesignValues>]]></xml-property>
</oda-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">sans-serif</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab-cell" id="5">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab" id="6">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
</styles>
<page-setup>
<simple-master-page name="MP1" id="2">
<property name="backgroundColor">#FF8080</property>
<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>
<simple-master-page name="MP2" id="43">
<property name="backgroundColor">#FFFF80</property>
</simple-master-page>
</page-setup>
<body>
<table id="78">
<property name="masterPage">MP1</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"
type="javascript">dataSetRow["ORDERNUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRODUCTCODE</property>
<text-property
name="displayName">PRODUCTCODE</text-property>
<expression name="expression"
type="javascript">dataSetRow["PRODUCTCODE"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">QUANTITYORDERED</property>
<text-property
name="displayName">QUANTITYORDERED</text-property>
<expression name="expression"
type="javascript">dataSetRow["QUANTITYORDERED"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRICEEACH</property>
<text-property
name="displayName">PRICEEACH</text-property>
<expression name="expression"
type="javascript">dataSetRow["PRICEEACH"]</expression>
<property name="dataType">float</property>
</structure>
<structure>
<property name="name">ORDERLINENUMBER</property>
<text-property
name="displayName">ORDERLINENUMBER</text-property>
<expression name="expression"
type="javascript">dataSetRow["ORDERLINENUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">rwc</property>
<text-property name="displayName">rwc</text-property>
<expression name="expression"
type="javascript">dataSetRow["rwc"]</expression>
<property name="dataType">integer</property>
</structure>
</list-property>
<list-property name="filter">
<structure>
<property name="operator">le</property>
<expression name="expr"
type="javascript">row["rwc"]</expression>
<simple-property-list name="value1">
<value>30</value>
</simple-property-list>
</structure>
</list-property>
<column id="112"/>
<column id="113"/>
<column id="114"/>
<column id="115"/>
<column id="116"/>
<column id="117"/>
<header>
<row id="79">
<cell id="80">
<label id="81">
<text-property
name="text">ORDERNUMBER</text-property>
</label>
</cell>
<cell id="82">
<label id="83">
<text-property
name="text">PRODUCTCODE</text-property>
</label>
</cell>
<cell id="84">
<label id="85">
<text-property
name="text">QUANTITYORDERED</text-property>
</label>
</cell>
<cell id="86">
<label id="87">
<text-property
name="text">PRICEEACH</text-property>
</label>
</cell>
<cell id="88">
<label id="89">
<text-property
name="text">ORDERLINENUMBER</text-property>
</label>
</cell>
<cell id="90">
<label id="91">
<text-property name="text">rwc</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="92">
<cell id="93">
<data id="94">
<property name="textAlign">justify</property>
<property name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">ORDERNUMBER</property>
</data>
</cell>
<cell id="95">
<data id="96">
<property name="textAlign">justify</property>
<property name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">PRODUCTCODE</property>
</data>
</cell>
<cell id="97">
<data id="98">
<property name="textAlign">justify</property>
<property name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">QUANTITYORDERED</property>
</data>
</cell>
<cell id="99">
<data id="100">
<property name="textAlign">justify</property>
<property name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">PRICEEACH</property>
</data>
</cell>
<cell id="101">
<data id="102">
<property name="textAlign">justify</property>
<property name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">ORDERLINENUMBER</property>
</data>
</cell>
<cell id="103">
<data id="104">
<property name="whiteSpace">nowrap</property>
<property name="resultSetColumn">rwc</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="105">
<cell id="106"/>
<cell id="107"/>
<cell id="108"/>
<cell id="109"/>
<cell id="110"/>
<cell id="111"/>
</row>
</footer>
</table>
<table id="118">
<property name="masterPage">MP2</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"
type="javascript">dataSetRow["ORDERNUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRODUCTCODE</property>
<text-property
name="displayName">PRODUCTCODE</text-property>
<expression name="expression"
type="javascript">dataSetRow["PRODUCTCODE"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">QUANTITYORDERED</property>
<text-property
name="displayName">QUANTITYORDERED</text-property>
<expression name="expression"
type="javascript">dataSetRow["QUANTITYORDERED"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRICEEACH</property>
<text-property
name="displayName">PRICEEACH</text-property>
<expression name="expression"
type="javascript">dataSetRow["PRICEEACH"]</expression>
<property name="dataType">float</property>
</structure>
<structure>
<property name="name">ORDERLINENUMBER</property>
<text-property
name="displayName">ORDERLINENUMBER</text-property>
<expression name="expression"
type="javascript">dataSetRow["ORDERLINENUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">rwc</property>
<text-property name="displayName">rwc</text-property>
<expression name="expression"
type="javascript">dataSetRow["rwc"]</expression>
<property name="dataType">integer</property>
</structure>
</list-property>
<list-property name="filter">
<structure>
<property name="operator">gt</property>
<expression name="expr"
type="javascript">row["rwc"]</expression>
<simple-property-list name="value1">
<value>30</value>
</simple-property-list>
</structure>
</list-property>
<column id="152"/>
<column id="153"/>
<column id="154"/>
<column id="155"/>
<column id="156"/>
<column id="157"/>
<header>
<row id="119">
<cell id="120">
<label id="121">
<text-property
name="text">ORDERNUMBER</text-property>
</label>
</cell>
<cell id="122">
<label id="123">
<text-property
name="text">PRODUCTCODE</text-property>
</label>
</cell>
<cell id="124">
<label id="125">
<text-property
name="text">QUANTITYORDERED</text-property>
</label>
</cell>
<cell id="126">
<label id="127">
<text-property
name="text">PRICEEACH</text-property>
</label>
</cell>
<cell id="128">
<label id="129">
<text-property
name="text">ORDERLINENUMBER</text-property>
</label>
</cell>
<cell id="130">
<label id="131">
<text-property name="text">rwc</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="132">
<cell id="133">
<data id="134">
<property name="textAlign">justify</property>
<property name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">ORDERNUMBER</property>
</data>
</cell>
<cell id="135">
<data id="136">
<property name="textAlign">justify</property>
<property name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">PRODUCTCODE</property>
</data>
</cell>
<cell id="137">
<data id="138">
<property name="textAlign">justify</property>
<property name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">QUANTITYORDERED</property>
</data>
</cell>
<cell id="139">
<data id="140">
<property name="textAlign">justify</property>
<property name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">PRICEEACH</property>
</data>
</cell>
<cell id="141">
<data id="142">
<property name="textAlign">justify</property>
<property name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">ORDERLINENUMBER</property>
</data>
</cell>
<cell id="143">
<data id="144">
<property name="whiteSpace">nowrap</property>
<property name="resultSetColumn">rwc</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="145">
<cell id="146"/>
<cell id="147"/>
<cell id="148"/>
<cell id="149"/>
<cell id="150"/>
<cell id="151"/>
</row>
</footer>
</table>
</body>
</report>




On 2/1/2011 4:59 PM, Steve Bliss wrote:
> Jason Weathersby wrote on Tue, 01 February 2011 16:04
>> You can create multiple masterpages and then in Page Break property
>> for a report element set the master page property for the report item.
>
>
> I tried that, I set the Page Break / Master Page property for an element
> near the beginning of the report design to my 'second page' masterpage -
> but it forced an immediate page break at that element, instead of
> continuing the flow on page 1.
>
> Is there a way to select one masterpage for page 1, and a different
> masterpage for pages 2+?
>
> Thanks,
> Steve
>
>
Re: Create Report with a Title Page [message #652604 is a reply to message #652107] Fri, 04 February 2011 16:49 Go to previous messageGo to next message
Steve Bliss is currently offline Steve Bliss
Messages: 15
Registered: February 2011
Junior Member
Thanks for the workaround, and the example report design. Unfortunately, implementing this in my report would be awkward, due to the number of row level elements - there are a lot of places where the break between pages 1 and 2 can occur.

Is the current page number available during report generation? It would be easy enough to add logic like
if (page == 1) { this.getStyle().masterPage = "FirstPage" } else { this.getStyle().masterPage = "OtherMasterPage" }
in the onPrepare event slots of the elements.

Is there some other way to script MasterPage selection? Some event that can be used?

Alternately, maybe I'm missing a better solution to my situation. What I actually need to accomplish is to display an image (a generated barcode) on the bottom of page 1, and a different barcode image on other page foooters. The actual layout is the same, just a different image. The jpg image data are generated and embedded as byte array elements in the app context. Any ideas on how to accomplish this?

Thanks for any help!
Re: Create Report with a Title Page [message #652998 is a reply to message #652604] Mon, 07 February 2011 21:35 Go to previous messageGo to next message
Steve Bliss is currently offline Steve Bliss
Messages: 15
Registered: February 2011
Junior Member
UPDATE - I discovered the key I needed in a post on Actuate's BIRT forum. I thought I'd post my solution here, in case it helps someone else.

The only difference in the page footer between page 1 of my report and all the other pages was the specific image being displayed. So, I set up 2 image elements in the page footer, like Footer > Grid > Row > Cell [ImageFirst ImageFollowing].

In ImageFirst's OnRender event property, I added this code:

if (pageNumber > 1) { this.getStyle().display ="none" }

Likewise, ImageFollowing's OnRender event property got this bit:

if (pageNumber == 1) { this.getStyle().display ="none" }

That's all there was to it!
Re: Create Report with a Title Page [message #654234 is a reply to message #652998] Mon, 14 February 2011 17:17 Go to previous message
Steve Bliss is currently offline Steve Bliss
Messages: 15
Registered: February 2011
Junior Member
UPDATE to the UPDATE - The solution I explained above only works when there are hard page breaks (ie, an element has the "break before" or "break after" option set). When the report content is long enough to cause a "soft page break" at the end of page 1, the footer on the second page comes out exactly the same as the page 1 footer.

I went back to using Jason's suggestion, using two different master pages, with two elaborations. First, my report has both group header lines and occasional detail footer lines, with different font sizes and therefore, line heights. Additionally, the detail footers sometimes word-wrap onto multiple lines. So, instead of counting the number lines, I actually had to estimate 'line' heights.

The second elaboration is my report has several report elements following the main detail table, and then 2 additional sections on separate pages with their own detail. For the trailing elements in the first section, I added the total height of the detail section into the report. Then I created an OnCreate script for each element, something like:

if ( totalDetailHeight >= 38 ) { this.getStyle().masterPage = "SecondMasterPage"; }


Finally, the 2 additional report sections were hard-assigned to the "SecondMasterPage", under the Page Break properties section.
Previous Topic:how to decode base64 password in BIRT script and when
Next Topic:Extracting data column binding of a table
Goto Forum:
  


Current Time: Thu Oct 23 13:22:13 GMT 2014

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

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