Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Master Page problems
bdmclain
I took an existing Birt report and made some modifications. One of the modifications is that I replaced the Master Page with a blank master page.
I cannot seem to add a anything to the header or footer.
I would like to add a page N of Max to the footer and an gif to the header.
Has anyone else had this problem?
Find more posts tagged with
Comments
mwilliams
Hi bdmclain,
So, there is nothing in the master page header or footer at all and you can't add anything to it? Can you attach the report design you're having issues with? What version of BIRT are you using?
szopkoa
Hi all,
I got a problem regarding Master Pages as well, so I did not make a new thread, hope this is o.k.
I discovered a strange behaviour when trying to modify variables in the onPageStart method of Master Pages: it seems that the variable only updated at the next page.
In other words, it makes no difference if I put it in the onPageStart or in the onPageEnd method.
I was expected that if I for example increment a variable in the onPageStart, than the incremented value will be written on the actual page, not just the next one.
Did I misunderstand something, or is it really acting wrong?
(I worked around this, but it is really annoying me)
I'm using version 2.5.1.v20090710
Thanks,
Andras
mwilliams
Hi Andras,
Can you explain more about what you're doing? What do you do with this incremented variable, etc? Let me know.
szopkoa
Hi mwilliams,<br />
<br />
thank you for responding.<br />
<br />
<br />
This report is listing a total charge for a customer on the first page, and than, from the second page the details of this total charge is listed (if any).<br />
The report lists these data for multiple customers.<br />
<br />
I use two different master pages: the first one is for addressing the customer, showing the total charge, etc, and than there is a table for the details using the second master page.<br />
<br />
For page numbering, I cannot use the built in autotext variable, since it should start from 1 every time the report gets to the first master page.<br />
<br />
That is why I defined a report variable (<em class='bbc'>page_num</em>), and I put it in the header of both master pages via an AutoText element.<br />
<br />
I inserted two little scripts:<br />
<br />
onPageStart method of the first master page:<br />
<br />
<em class='bbc'>vars["page_num"] = 1;</em><br />
<br />
onPageStart method of the second master page:<br />
<br />
<em class='bbc'>++vars["page_num"];</em><br />
<br />
This won't work, because this seems to take effect only on the next page, not the actual, as I was expected.<br />
<br />
Let's say every customer has a 3 page detailed list, than the page number should be like:<br />
<br />
#1 (addressing of first customer)<br />
#2 (list of 1st customer)<br />
#3 (list of 1st customer)<br />
#4 (list of 1st customer)<br />
#1 (addressing of second customer)<br />
#2 (list of 2nd customer)<br />
#3 (list of 2nd customer)<br />
#4 (list of 2nd customer)<br />
[...]<br />
<br />
Instead of the above, I get:<br />
<br />
#0 (default value)<br />
#1 (the previous master page onPageStart method takes effect)<br />
#2<br />
#3<br />
#4 (this is where it should be #1 again)<br />
#1 (the previous master page onPageStart method takes effect)<br />
#2<br />
#3<br />
[...]<br />
<br />
Again, I performed a workaround, I'm just curious if it is a bug, or is supposed to act like that.<br />
<br />
Thank you for your effort,<br />
Andras<br />
<br />
(sorry for the long post)
mwilliams
Andras,<br />
<br />
It sounds like a bug to me. You can log a bug at <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/reportabug.php'>BIRT
: Reporting Bugs and Requesting Enhancements</a>. You may do a quick search before posting to see if it's been reported already. If you have time, can you set up a report with this issue with the sample database so I can run the report and see it? Thanks.
szopkoa
Hello Michael,<br />
<br />
I submitted a bug (<a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=293550'>https://bugs.eclipse.org/bugs/show_bug.cgi?id=293550</a>)
, and here's a report design illustrating the described issue.<br />
<br />
Thank you for your support.<br />
<br />
Andras
mwilliams
Andras,
Definitely looks like a bug to me.
szopkoa
Hello Michael,
than hope it will be fixed in the next version.
Thanks again,
Andras