Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Setting the MasterPage Dynamically
Megha Nidhi Dahal
Hello Community,<br />
<br />
I have a requirement where in, I need to exclude some information from the header in the subsequent pages. I have created two master pages, but the problem here is, there is only one report item which breaks into multiple pages. For the first page I need to show all the info in the header, but on pageBreak I need to switch the master pages. I tried using script in the onPageBreak for that table and change the master page but it didn't work out. I may have been doing it wrong.<br />
I did something like this in the onPageBreak of the table:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>this.getStyle().masterPage = "SecondMasterPage"</pre>
<br />
Please correct what is wrong here, or suggest something which will make it work.<br />
<br />
Thanks<br />
Megha
Find more posts tagged with
Comments
JasonW
Megha,
You can not change a master page for a report item once the generation starts. If your report item is a table why not copy the table and have two tables. Filter the first table to show only the first 30 rows of data and filter the second table to show the remaining rows. Assign a master page to each table. Or try an onRender script to change header text. Look at the attached two examples. One shows two tables which shows odd rows in one table and even rows in the other. The second example shows some onRender scripts.
Jason
JasonW
Sorry forgot to attach the file.