Jump to content

Subreports and number of pages


giobby

Recommended Posts

 

Hi everybody,
i'll try to explain what i'm trying to do and what is the problem with iReport2.0.2:
i have a "master report" which contains , in the summary band, two subreports. the subreports are divided by a page break.
in the "report properties" of the master report i've chekked the property "print subreports in new page".
in this way each subreport is printed in a new page.
I have to put the page number in every page of the report (also in the pages of the subreports).
the first time i've printed it in the summary band of the main report before each subreport but , if the report has more than one page, it doesn't work.
Now i'm trying to get the number of pages passing to the first subreport the pages of the main report, adding the number of pages in the first subreport with a variable and retrieving it in a variable. it's ok, i can also print the correct number of pages returned from the first subreport after it.
now i would like to pass this number to the second Subreport but it doesn't works. i've created a new parameter  for the second subreport and i've tried to pass first a variable and then another parameter from the mai report but it doesn't work.
is there an easier way to have the number of page in subreports? if not, what is the mistake in my way? In the attachment the source of my report and subreports
Thank you ...
 

 

 

 

 

Giovanni

...La puissance est rien sans controle...

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi Giovanni,

have you tried to use the build-in variable PAGE_NUMBER?

I had a similar problem in one of my reports. I have a subreport in the summary band of my main report. The main report won't print a page footer on the summary band, if it flows over more than one page. So I created an extra page footer in my subreport and there I use the PAGE_NUMBER variable of the subreport. To get the sum of all pages I used the Evaluation time "Report" (I use iReport 3.6.0). That did the trick for me.

HTH

Christina.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...