0

Trying to create a report with two different master pages. The expectation is that the First one will be applied on very first page. And second one will be applied from second page and repeat till end of all pages.

But we are having issue mentioned in the title.

Tried resetting repeatHeader and pageBreakInterval properties and also tried resetting master pages.

Following is the sample report design layout, as you can see we are having two tables with two different master pages still the first one gets repeated over all the pages. Any suggestion what we are missing here.

================== Master pages =======================
<page-setup>
**<simple-master-page name="FirstMasterPage" id="2">**
<property name="orientation">portrait</property>
<property name="showHeaderOnFirst">true</property>
<property name="showFooterOnLast">true</property>
<page-header>
<label id="171">
<property name="fontSize">14pt</property>
<property name="textAlign">center</property>
<text-property name="text">Portrait</text-property>
</label>
</page-header>
</simple-master-page>
**<simple-master-page name="SecondMasterPage" id="8">**
<property name="orientation">landscape</property>
<page-header>
<label id="172">
<property name="fontSize">12pt</property>
<property name="textAlign">center</property>
<text-property name="text">Landscape</text-property>
</label>
</page-header>
</simple-master-page>
</page-setup>

================== Table ======================= 
<body>
<table name="myTableFirst" id="173">
**<property name="masterPage">FirstMasterPage</property>**
<property name="pageBreakAfter">always</property>
<property name="pageBreakBefore">auto</property>
<property name="repeatHeader">false</property>
<property name="pageBreakInterval">0</property>

// some column details
</table>

**<table name="myTable" id="217">
**<property name="masterPage">SecondMasterPage</property>**
<property name="pageBreakAfter">always</property>
<property name="pageBreakBefore">auto</property>
<property name="repeatHeader">true</property>
<property name="pageBreakInterval">40</property>**

// some column details
</table>

Following dependencies are used for the Birt report

org.eclipse.birt.runtime_4.9.0-20220315
org.eclipse.equinox.common_3.10.0.v20180412-1130
org.eclipse.equinox.registry_3.8.0.v20180426-1327
org.eclipse.core.runtime_3.14.0.v20180417-0825
org.eclipse.osgi --> 3.10.2.v20150203-1939
org.eclipse.datatools.connectivity.oda_3.6.1.201712071719
org.mozilla.javascript_1.7.5.v201504281450
org.apache.batik.css_1.7.0.v201011041433
org.apache.batik.util_1.7.0.v201011041433
com.lowagie.itext
org.osgi.service.prefs

Any help would be highly appreciated.. Thanks

1 Answers1

0

Maybe that was a bug in BIRT 2.5.x.

Master pages work as expected since at least BIRT 3.7.1.

If you want different master pages, then you need to explicitly assign the master pages to some layout container objects where you want to switch the master pages (I recommend to explicitly specify the master page for the very first layout object, too). If the master page property changes, BIRT will issue a page break and switch to the new master page.

hvb
  • 2,484
  • 1
  • 10
  • 13