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)
Two seprate headers in one .rptdesign file
qriousBirt
Hi,<br />
<br />
I have a .rptdesign file which has 20 pages of data.<br />
<br />
I would like to set <strong class='bbc'>first</strong> HEADER for first 10 pages and then <strong class='bbc'>second</strong> HEADER for rest 10 pages<br />
considering page number are from 1 to 20. I'm having 2 headers as two separate images.<br />
<br />
Currently, I've added two headers in one master pages. Only one of them should be shown as per above <br />
condition.<br />
<br />
Please suggest.<br />
<br />
Thanks,<br />
Aditya
Find more posts tagged with
Comments
mwilliams
In the on render of one, you could try:
if (pageNumber <=10){
this.getStyle().display="none";
}
And in the other try:
if (pageNumber > 10){
this.getStyle().display = "none";
}
Then run it in the "web viewer" to see if it does what you want.
qriousBirt
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="77399" data-time="1306160640" data-date="23 May 2011 - 07:24 AM"><p>
In the on render of one, you could try:<br />
<br />
if (pageNumber <=10){<br />
this.getStyle().display="none";<br />
}<br />
<br />
And in the other try:<br />
<br />
if (pageNumber > 10){<br />
this.getStyle().display = "none";<br />
}<br />
<br />
Then run it in the "web viewer" to see if it does what you want.<br /></p></blockquote>
<br />
<br />
Hi mwilliams,<br />
<br />
Thanks for your reply...<br />
<br />
The logic has worked for static data like 20 pages in one report.<br />
<br />
But, I'm having dynamic data in a report using several datasets. Like N number of pages in one report.<br />
And I'm having one Master Page which has 2 headers which are to be shown depending upon data set.<br />
Like, till Dataset X is closed, I've to show first header, After next Dataset opened we have to show Second Header.<br />
<br />
Outside Master page, I'm not able to get references(Object) of headers added to master page or do manipulation in the same, like following.<br />
<br />
Dataset X afterClose() Event<br />
if(parseInt(reportContext.getGlobalVariable("varX")) == 1)// It is returning null<br />
{<br />
//Here, i want to change the header value in master page like From Header 1 to Header 2<br />
}<br />
<br />
Or if i can change the value of header, So there will be only one header.<br />
<br />
Thanks,<br />
Aditya
mwilliams
You just want to show a different masterpage header for each different dataSet? If so, you could just use different masterpages for each dataSet's table.
qriousBirt
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="77570" data-time="1306361241" data-date="25 May 2011 - 03:07 PM"><p>
You just want to show a different masterpage header for each different dataSet? If so, you could just use different masterpages for each dataSet's table.<br /></p></blockquote>
<br />
Thanks mwilliams,<br />
<br />
It worked out, After, I directly changed the xml property for Master Page value.<br />
<br />
But, Can you tell me how to set Master Page for particular dataset from IDE level i.e report editor?<br />
<br />
Thanks,<br />
Aditya
mwilliams
Once you've created two masterpages, you simply need to make sure you force a page break between the two tables so that a new masterpage can start. Then, you select the table, go to the property editor, select the page break section, and you'll see a setting for the masterpage. Hope this helps.
qriousBirt
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="77617" data-time="1306419426" data-date="26 May 2011 - 07:17 AM"><p>
Once you've created two masterpages, you simply need to make sure you force a page break between the two tables so that a new masterpage can start. Then, you select the table, go to the property editor, select the page break section, and you'll see a setting for the masterpage. Hope this helps.<br /></p></blockquote>
<br />
<br />
Ok. Thats fine. Thanks,<br />
<br />
One more thing to ask i.e.<br />
<br />
I'm having two Master Pages now,<br />
In first master page, I dont have any footer,<br />
In second master page, I've footer with auto text page number.<br />
<br />
And i've set Second master page FROM the second page of the entire report.<br />
<br />
My problem is, On the second page, its showing as Page 2 instead of Page 1.<br />
<br />
Second master page has diffrent header, So i've applied it from second of the report.<br />
<br />
Is there any way to change the starting value of auto text page number..?<br />
or<br />
If i can decrement the auto text value by 1..?<br />
<br />
Please help.<br />
<br />
Thanks,<br />
Aditya
mwilliams
What's your BIRT version? I'll show you a quick example of a way it can be done.
qriousBirt
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="77621" data-time="1306422441" data-date="26 May 2011 - 08:07 AM"><p>
What's your BIRT version? I'll show you a quick example of a way it can be done.<br /></p></blockquote>
<br />
<br />
Eclipse BIRT Designer Version 2.6.2.r262_v20110209 Build <2.6.2.v20110214-1523>
mwilliams
Take a look and let me know if you have questions.
qriousBirt
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="77626" data-time="1306425583" data-date="26 May 2011 - 08:59 AM"><p>
Take a look and let me know if you have questions.<br /></p></blockquote>
<br />
<br />
Thanks mwilliams,<br />
<br />
When I run this example, It showing as per my requirement.<br />
<br />
But in that example, There is only 1 GRID/TABLE... And In my report, There are atleast 4 to 5 GRID's having different Master Pages for some.<br />
<br />
When, the 1st GRID ends printing data... Page number is not getting incremented.<br />
<br />
<br />
Please suggest with some example having 4 to 5 GRIDS & page number starting from second page.<br />
<br />
<br />
Thanks,<br />
Aditya
mwilliams
Aditya,
Are you using different masterpages for all of your different sections? If so, you'll need to copy the dynamic text element from the masterpage that works to the others.
qriousBirt
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="77767" data-time="1306855150" data-date="31 May 2011 - 08:19 AM"><p>
Aditya,<br />
<br />
Are you using different masterpages for all of your different sections? If so, you'll need to copy the dynamic text element from the masterpage that works to the others.<br /></p></blockquote>
Yes mwilliams, Thats fine, I have to copy that Dynamic Text to which ever Master Pages i want.<br />
But, Right now, that dynamic text is not getting incremented in the first grid itself.<br />
It is showing only 1 on all pages the First Grid has created.<br />
<br />
Please suggest more about "Page Break After" property in Advanced -> Section-><br />
As you have set it to "Always" for First Grid in your above example.<br />
<br />
Thanks,<br />
Aditya
mwilliams
I have it set to Always in my first grid because when you switch to a new masterpage, there has to be a definite page break. And, in my example, I believe I used the first page as a "title page", so you'd want to page break in that situation anyhow. Let me know.
qriousBirt
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="77838" data-time="1306943857" data-date="01 June 2011 - 08:57 AM"><p>
I have it set to Always in my first grid because when you switch to a new masterpage, there has to be a definite page break. And, in my example, I believe I used the first page as a "title page", so you'd want to page break in that situation anyhow. Let me know.<br /></p></blockquote>
<br />
Yes, That's right.<br />
<br />
Anyhow, I need page break for my first Grid used as Title Page. And from second Grid onwards,<br />
I need to show page number starting from 1.<br />
In addition to that, From second Grid, I've set another Master page (For different header)<br />
<br />
Thanks,<br />
Aditya
mwilliams
So, the example should show you exactly how to do what you're wanting then, I think. What are you hung up on?
qriousBirt
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="77919" data-time="1307033168" data-date="02 June 2011 - 09:46 AM"><p>
So, the example should show you exactly how to do what you're wanting then, I think. What are you hung up on?<br /></p></blockquote>
I've done the same thing like that example. <br />
i.e.<br />
<br />
1) I've set Page Break After to "Always" for my first Grid (used as Title page)<br />
2) I've set one Master for table after first Grid (Actual Data).<br />
3) Then, I added Dynamic text like your example in the Master page for Table<br />
<br />
But, Page number is not getting incremented.<br />
<br />
Thanks,<br />
Aditya
mwilliams
Can you create a report with the sample database that has your issue and attach it in here? Thanks!
nnc
<p>Hi,</p>
<p> I have 5 reports . i have set page break to set display always on master page. I need help with below questions.</p>
<p>Please advice.</p>
<p> </p>
<p>1. How to display different header on different pages.</p>
<p>2. I want to print header with report when i export to excel .</p>
<p> </p>
<p>I appreciate if you could give detail steps.</p>