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)
Change of page number with change of group
Vineet Joshi
Hi
I am using Birt 2.3.2 ,scripted data source .
I have following issues:
1>I want to display page number in report layout and this page number should change with the change of group .
2>Also i need to hide certain grids on the page number change i.e the grid should be visible on page 1(of group) and should be hidden on page2.
Thanks and regards
Vineet
Find more posts tagged with
Comments
mwilliams
What do you mean the page number should change with the change of groups? Like, if you had a 4 page group and then a 3 page group, it'd be:
1of4
2of4
etc
1of3
...
?
Or something else?
Vineet Joshi
Hi Williams
You got it right, and i got it solved from one of the examples posted by you .
But the problem is the page number is working fine when i use it in master page ,but sticks to "1" in case i use it in report layout(while taking PDF ,it is working fine in web viewer).
Also I want to hide some of the grids based on these page numbers like i want to hide the grid if page number is "1" and display when page number is "2".
Thanks in Advance
Vineet .
mwilliams
The PDF output from the designer uses the runandrender task rather than using them separately, like the web viewer does. In the newer versions, if you export from the viewer, you'll get the same output as the viewer. In 2.3.2, there might have been an issue with this. To hide the elements you don't want, have you tried checking your page number variable in the onRender and setting the display style property to "none" when you're on a page you don't want to display the element?
Vineet Joshi
hey mike
thanks for the reply .
I am done with the pagination thing .i did attached it to the master page and it is working fine in pdf also .
But can you pls send any sample thing ...where i can hide the grid in the report layout with the change of page number .
Thanks
Vineet Joshi
Vineet Joshi
HI Williams
Please help with that Grid thing ....I need to do it ....
Thanks
Vineet Joshi
Vineet Joshi
Hi
Attached is the rpt file .
Now i want to hide "label"(on Group Header) on page 2 of 2 and display it in 1 of 2 .
Somebody Please tell me how to do it
Thanks
Vineet
Vineet Joshi
Hi
I was able to hide the label on page 1 , and display it in page 2 but only in web viewer . the pdf output is exact opposite of what i am getting in web viewer ie label is shown on 1st page and get hidden in other pages.
PLEASE HAVE A LOOK AT THE RPT FILE .
thanks and regards
Vineet Joshi
Yogesh Maharwade
Hi vinit
It seems to be a bug of BIRT 2.3.2.
mwilliams
Where are you putting your grid? If you have the grid in your masterpage footer, you can check the pageNumber in the onRender method and set the display style to "none" when pageNumber !=1. Can you attach a design made with the sample database that I can run where this doesn't work for you?
Vineet Joshi
HI mike,
Thanks for your attention,
I want to hide lable on first page and show on all remaining pages of same group.
I am getting desire output in web viewer (check script on render) but not getting on pdf which is required.
Please check the pdf
Thanks
Vineet
mwilliams
piwya is correct, this is a bug in 2.3.2 where the onRender is only called once per group header. The header is just repeated for the remaining pages in that group. This is different in newer versions, I believe. I tried several ways to get around this with no success. If you can use the masterpage to display this rather than the group header or if you can upgrade, you might be able to get it done.
lrnrit
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="92043" data-time="1323992044" data-date="15 December 2011 - 04:34 PM"><p>
piwya is correct, this is a bug in 2.3.2 where the onRender is only called once per group header. The header is just repeated for the remaining pages in that group. This is different in newer versions, I believe. I tried several ways to get around this with no success. If you can use the masterpage to display this rather than the group header or if you can upgrade, you might be able to get it done.<br /></p></blockquote>
<br />
<br />
Hi Williams<br />
<br />
As discussed above . we have issue with onRender method in Pdf. I was thinking way around and got some success in doing it. <br />
<br />
I used pageBreak method wtih onrednder to show Particular label on first page and hide them on later page of same group (this.getStyle.display = "NONE" script used in page break).<br />
<br />
<br />
and it worked for both viewer and pdf .<br />
<br />
But now issue is it dint work in reverse case means when we want to show that label on other pages other then first. <br />
<br />
Do we have any way to made (method ) hidden label or grid to be visible which could be used page break method. so it could work in both viewer and PDF. (Something like this.getStyle.display = "DISPLAY")<br />
<br />
<br />
regards<br />
<br />
lrnit
mwilliams
lrnit - What is your BIRT version? I know there have been various bugs with using pageNumber throughout the various versions. Let me know, I'll take a look. You're talking in the masterpage, right?
Vineet - I did think of a workaround that might work for you on hiding this element in the group header. If you can create a group inside the current group that is just an interval grouping, and make the interval just large enough so that the rows will definitely fit on a page, you'll have a new group header for every single page that you can work with, therefore, you should be able to hide it in PDF as well. Let me know if you need help with this.
Vineet Joshi
Hi Williams
Pls Send me a sample if that is possible .
As Irnit Asked ,is it possible to hide a label on first page and display it on other pages of same group .
Thanks
Vineet
mwilliams
Vineet,
Take a look at this example.
Yogesh Maharwade
hey Mike great work.