Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Display master page footer on last page only with DE API
Migrateduser
<p>Hi,</p>
<p> </p>
<p>I'm designing a report with Design Engine API. In my report, I must display a label only at the end of the report's last page. To perform this, I tried to define a master page, assign it to "masterPage" property of the last row of the grid in the report, and add the master page to the global design. But the footer appears on every page of my report, which is not what I want, instead I want it to be visible only on the last page of my report. Below is the code I used, can you tell me what I did wrong? My grid displays can display on several pages, depending on content read from a dataSet. with page break correctly managed.</p>
<p> </p>
<p>Thanks for your help</p>
<p> </p>
<p> </p>
<p><b>final</b> SimpleMasterPageHandle masterPage = factory.newSimpleMasterPage("Page Master");</p>
<p>design.getMasterPages().add(masterPage);</p>
<p><b>final </b>GridHandle gridHandle = factory.newGridItem("main grid", 2, 4);</p>
<p>design.getBody().add(grid);</p>
<p><b>final</b> RowHandle lastRow = (RowHandle) grid.getRows().get(3);</p>
<p>lastRow.setProperty("masterPage", masterPage.getName());</p>
<p><b>final</b>StyleHandle style = label.getPrivateStyle();</p>
<p>style.setProperty(StyleHandle.<b><i>FONT_FAMILY_PROP</i></b>, ARIAL_FONT);</p>
<p>style.setTextAlign(DesignChoiceConstants.<b><i>TEXT_ALIGN_CENTER</i></b>);</p>
<p>label.setText("my label");</p>
<p>masterPage.getPageFooter().add(label);</p>
<p> </p>
Find more posts tagged with
Comments
There are no comments yet