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)
To set a page variable from 3 different section
jain
Hi, I am looking for a solution for a common situation,
I have a report with 3 different sections. Each section has 3 different table, bind with 3 different datasets and grouped within the table.
First section have 1 page
Second section have 3 pages (grouping)
Third section might have 1 or more pages (depends on data).
I must ensure that a section always starts on a new page (page break).
Also in each section dataset there is something called reportId field, I need to set that reportId field value from 3 different dataset(each section) in one pagevariable(global variable); so that I can use that value in Masterpage.
Find more posts tagged with
Comments
kclark
You could use a grid to split up the sections. Drag a grid with 3 rows and 1 column and then you can drag each section/table into the correct grid. To make sure each section is on it's own page select each row in the column and set the page breaker after to always.
jain
Thanks Kclark for your response.
In my report I need to set the content in master page footer based on the element Id. I have three sections in my report and each section has table element and I must ensure that a section always starts on a new page (page break).
Also the master page footer content varies for each section, so how do I change the content for each section in master page footer?
section1(in page 1): Header(some logo)
Table
Footer ("some test for example: Test A")
section2(in page 2): Header(some logo)
Table
Footer ("some test for example: Test B")
section3(in page 3): Header(some logo)
Table
Footer ("some test for example: Test c")
jain
Hi Kclark, I have tried with the solution what you have provided, its working only when there is no grouping for that table. I want to group all three section based on common Id, so how do I make this to work. ie.., grouping within the table.
I want something like this,
outer-GroupedHeader(grouped on common Id)
Inner Grid with 3 rows
Inside the Grid row-added 3 sections
kclark
jain,<br />
I've attached an example let me know if it works for you. I made a sample logo, a grid with three tables, all with grouping, and each row of the grid forces a page break. I was able to change the footer based on which page was displayed using pageNumber since I have a static amount of rows in my grid. I added a label to the master page then used this code in onRender()<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if(pageNumber == 1) {
var table1 = reportContext.getDesignHandle().getElementByID(17).name;
this.text = table1;
} else if(pageNumber == 2) {
var table2 = reportContext.getDesignHandle().getElementByID(90).name;
this.text = table2;
} else if(pageNumber == 3) {
var table3 = reportContext.getDesignHandle().getElementByID(114).name;
this.text = table3;
}</pre>
<br />
It just changed the label text in the footer to the name of the table on the current page. Let me know if this is what you were trying to do.