Jump to content

Creating new pages in iReport and page numbering


louise

Recommended Posts

Hi.  I am a librarian and the suppliers of our Library management system have created a series of templates that can be customized in iReport.  For some reason, they say they only work with version 1.3.3. which seems pretty ancient. 

Anyway, I have been customizing the template in this version, but I am stuck on a real basic - creating new pages.  The only way I can see to do this is to change the length of the template to the total length of the 4-page perforated card that we use and then insert page breaks.  This works in that it prints 4 separate pages when tested.  However, each page needs to be numbered (part 1,2,etc).  I have inserted the 'Page number' field from the iReport Library onto each page, but when it prints it gives each page the same number (1).  It doesn't appear to recognise the page breaks. 

Can anyone tell me how I can get the page numbering to work (given that I have to use version 1.3.3).

Thanks.

Louise

 

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi Giovanni - Thanks for the response.  it's in the Details Band.  I have used only the Details band for the whole 'report' and put page breaks in.  Is this incorrect?

Catching your drift, I've just tried to insert a Page Header band in which to insert the Page Count field, but the height keeps reverting to 1 pixel and report shows 'Background' rather than 'Page Header'.    Also, because the pages are separated by page breaks and are effectively one long Details band, it appears that I can't add any further bands (e.g. page header) to a specific page. 

I've read somewhere about creating subreports for each page and inserting page breaks between each one.  I was trying to avoid this as it seems very complicated, but I presume this would allow me to customzie the bands for each page (ie subreport) that way?

Thanks

Louise

 

Link to comment
Share on other sites

Louise i don't know if is properly correct put page breaks in the detail band but if it works i think there are no problems (however ,humbly, i think is better to listen another one's opinion).
Anyway i ever put the "page_number" textfield in the pagefooter or pageheader (the 2nd one, in my cases, works always).


 

Giovanni


 

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


 

 



Post Edited by giobby at 11/11/2009 15:48
Link to comment
Share on other sites

Thanks again for you help. 

When I try and add the Page Header  band to my document (by changing the height from zero in Properties) I click Apply and the height changes to 1px even though this wasn't the value I'd entered.  If a try and drag down the band, it is labelled Background rather than Page Header.  Is this because I should have added all the bands I wanted *before* adding the content?

Thanks

Louise

Link to comment
Share on other sites

sorry but i've never met this problem and i hope it doesn't depends by your iReport version (i use the 2.0.0 vn and all the bands are ever settable by properties or "manual" resizing)...

i'm sure is better to wait another one's opinion (more expert than me)...

still sorry... bye

 

 

Giovanni

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

 

Link to comment
Share on other sites

Hi Louise,

 

the problem with the bands is given by the page height constraints imposed by JasperReports (there are several rules that can not be broken, like the sum of page header, footer and detail must be less that the maximum page height).

The problem may be oversome just putting the real content of each page in a subreport so the master details will remain small, while the subreport will provide all the space you require for your page.

About the page number, I think it is a problem of textfield timing. Select the textfield which shows the page number and try to set the evaluation time of the textfield to Page or Band.

Giulio

Link to comment
Share on other sites

  • 2 weeks later...

Hi Guilio

Apologies for the delay in thanking you for your advice.  I have just tested this and changing the Evaluation field to 'page' in Textfield properties and worked - each page is now printing with the correct page number.  Also, thanks for the info about the total band heights not exceeding the length of the report.  Once I decreased the height of the Details band I was able to increase the height of the Title band.

Thanks again

Louise

 

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...