PDA

View Full Version : Using page numbers in subreports



kam
03-25-2014, 12:16 PM
Hi,
I am new to Pentaho Reporting and am trying to get a handle on page numbers.

I have a report that consists of 4 banded subreports in the report header section of the master report. On each subreport the page number and total pages is in a different place and sometimes they are not even printed. I have a different standard forms that are set up in the watermark section of each subreport The page numbers would be right if I use a master report page header but I can't get the page numbers in the right place and I can't make them disappear when I need to When I use sticky from the main report, the page header prints on every page. Is there a way that I can pass the page number and the total pages to each subreport so I can use the subreports page header. How can i set the starting page to a different number in the subreport when I don't know the number going in. If I can't do that, how can I turn on/off the page number and total pages from the master page header section in the subreports?

Thanks in advance for your help.

Taqua
03-25-2014, 01:06 PM
Just use sub-report import parameter and list the name of your page and total-pages function. (On the subreport-tab, select the data-tree, and there you'll find the parameter definitions). List your fields to import (the name of the page- and total-pages functions) under the "import" (left hand side) list.

These functions have to be added in the master-report. This way, your subreports will let the master-report compute the page-numbers, but will still be in control on how they are printed.

kam
03-27-2014, 03:48 PM
Just use sub-report import parameter and list the name of your page and total-pages function. (On the subreport-tab, select the data-tree, and there you'll find the parameter definitions). List your fields to import (the name of the page- and total-pages functions) under the "import" (left hand side) list.

These functions have to be added in the master-report. This way, your subreports will let the master-report compute the page-numbers, but will still be in control on how they are printed.

Thanks Taqua,

I was doing it right so there was something else wrong with the reports. I set up one of my subrepprts to be two pages long. The page numbers printed right on the second page but when it went to the next subreport all the page numbers and total pages were messed up. I created two subreports and it is working now.

MrsEvans2004
04-24-2014, 09:32 AM
I am a Pentaho Novice. I am working on PRD and I am trying to enumerate by pages on a report. How can I do that?