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)
Total page problem
szopkoa
Hi,
we use BIRT 2.6.1
Page numbering in the designer is o.k., but when running on the application server (where we use the run and render tasks separetely) we experience a problem with total page numbers: hidden elements are also calculated in the total page count, so the [page/total page] on the last footer is for example [6/9] (the total page number is 6, but there is 3 pages of hidden data).
(hidden pages is for different outputs, i.e. to simplify the structure a second table is used for xls outputs, what is hidden in the pdf)
I tried to use different master pages, no luck.
Has anybody run into this problem, or can suggest a solution?
Cheers,
Andras
Find more posts tagged with
Comments
mwilliams
Hi Andras,
Are the blank pages shown? Or are they just being counted in the page number?
If you know how many pages are going to be hidden in PDF, you could create a custom page n of m in report and page variables and use the variable autotext to display the custom values in your pdf.
szopkoa
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="72631" data-time="1296062500" data-date="26 January 2011 - 10:21 AM"><p>
Hi Andras,<br />
<br />
Are the blank pages shown? Or are they just being counted in the page number?<br />
<br />
If you know how many pages are going to be hidden in PDF, you could create a custom page n of m in report and page variables and use the variable autotext to display the custom values in your pdf.<br /></p></blockquote>
<br />
Hello Michael,<br />
<br />
Thank you for your answer.<br />
<br />
The blank pages are not shown, they are just being counted.<br />
<br />
Unfortunately it is not known in advance, how many pages will be hidden...
mwilliams
Are you using auto or fixed page layout?
szopkoa
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="72724" data-time="1296244333" data-date="28 January 2011 - 12:52 PM"><p>
Are you using auto or fixed page layout?<br /></p></blockquote>
<br />
Hi Micheal,<br />
<br />
sorry for the delay. The master pages come from libraries, where their type is A4, and they got fixed layout.<br />
<br />
Cheers,<br />
Andras
mwilliams
Andras,
How do you decide to hide elements? Is it paramter based? If so, you could just drop the elements instead and you probably wouldn't have this issue anymore. Or are they elements you hide but are still using for something?
szopkoa
The elements (mostly two tables at the top of the hierarchy) are hidden based on the output format. The report creates different formats (pdf & xlsx), the data is the same, but the structure is different (much more simple in xlsxs). (Creating two reports for this is not an option for us.)<br />
<br />
Andras<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="72958" data-time="1296831229" data-date="04 February 2011 - 07:53 AM"><p>
Andras,<br />
<br />
How do you decide to hide elements? Is it paramter based? If so, you could just drop the elements instead and you probably wouldn't have this issue anymore. Or are they elements you hide but are still using for something?<br /></p></blockquote>
mwilliams
Andras,
You should also be able to just drop the unwanted elements based on output format as well. You would just do this in the beforeFactory of your report design. Check for the output format. Depending on the format, you'd drop the appropriate elements.
szopkoa
Hello Michael,<br />
<br />
having a table named "PDF" for PDF outputs, and "XLS" for XLS outputs, I tried the following in the beforeFactory event:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if (reportContext.getOutputFormat() == "pdf"){
XLSTable = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("XLS");
XLSTable.drop();
}</pre>
<br />
Now the PDF total page is correct, but there is nothing in the XLS... (please note, that we use the run and render task separately in our application server).<br />
<br />
If I remove the above code, the XLS is okay.<br />
<br />
Strange thing is, that if I drop the "PDF" table in case of the xls output, the PDF output is okay (except that the total page is doubled).<br />
<br />
Do you have any suggestion to work around this problem?<br />
<br />
Thanks,<br />
Andras
mwilliams
Hi Andras,
I don't see the same issue, I don't think. I made a sample with the sample database that shows one table when PDF and another with XLS. I colored them differently so that it could be seen for sure that it was working correctly. I see the correct one in both XLS and PDF and the page numbers are correct in PDF.
szopkoa
Sorry, I forgot to mention, that running the report in the designer works just fine (when RunAndRenderTask is used), but on our application server we render the report separetely. In that case, the XLS output is blank.
mwilliams
Let me get my viewer set up for 2.6.1 this afternoon and check that out. I'll let you know.