Problem with the total page-function [message #677045] |
Tue, 07 June 2011 08:02  |
Eclipse User |
|
|
|
Hi,
I'm using BIRT 2.6.2 and have a problem with the total page count. Sometimes it shows the correct number, that is the actual number of pages the end report consists of, and sometimes it shows a higher number.
Example:
The end report (pdf): 7 pages
In the header of each page:
1(9)
2(9)
etc. up to
7(9)
Is there any way around this problem? I've read a rumour of a similar bug that should be solved in the upcoming new release of BIRT, but unfortunately I need to solve this in version 2.6.2.
Background:
The last months I've been working on upgrading BIRT to 2.6.2 and one of the changes I've made is switching from RunAndRenderMethod to using RunMethod and RenderMethod separately. This to enable the use of the page count method and adding an empty page when needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Problem with the total page-function [message #716228 is a reply to message #716123] |
Tue, 16 August 2011 13:44  |
Eclipse User |
|
|
|
Thanks. A devshare item is just an example that is posted on
birt-exchange.org's dev share. If you look here:
http://www.birt-exchange.org/org/devshare/
You will see a lot of BIRT examples (Reports, articles, example APIs, etc)
Jason
On 8/16/2011 9:48 AM, aca wrote:
> I'm sorry but I don't know what a dev share item is.
> The steps I have added in the ReportEngineService are the following...
>
> 1. Create the report with createRunAndRenderTask(report) which results
> in a byteArrayOutPutStream. (This is standard code, but I include this
> step as a background for the following steps)
> 2. Convert the byteArrayOutPutStream into an byteArrayInputStream and
> create a pdfReader object.
> PdfReader reader = new PdfReader(new
> ByteArrayInputStream(baos.toByteArray());
> 3. Get number of pages from the reader int pageCount =
> reader.getNumberOfPages();
> if(pageCount%2>0){ //add an empty page }
|
|
|
Powered by
FUDForum. Page generated in 0.05329 seconds