I have a requirment where I need to display current page number and the total page number accross reports. I have a master report and 2 subreports. I am not able to identify how to display the correct pagenumber across the master and subreports. It would be great if u could help me. Thanks
相关问题
- Jasper: error opening input stream from url
- JasperReports Server parameter dependency
- How to show the Heading of a Sub-Report on each pa
- is it possible print element only when its detail
- JasperReports CompileReport
相关文章
- How to set up jasper reports in spring with subrep
- Modularization of Jasper reports: Pass data source
- How to use jasperreports subreports with grails ja
- Current URL /web/guest/HTML generates exception: n
- SAX2 driver class not found
- Passing array data from PHP to JasperReports (with
- How to force image url in jasper report export to
- SubReport not shown
Open Ireport and Go to Window-> Palette option here you can see a Page number and total page element in tool category. Now just drag and drop into that location where you want to print page numbers.
First of all you need to add a textfield to page footer in your main raport page, and the expression should be :
$V{PAGE_NUMBER}+" /"
Then add other text field right next to the first one and the expression should be :" " + $V{PAGE_NUMBER}
This will look like this : 1 / 2 But the important one is that;Then, for viewing correctly these page numbers on subreport pages; Click and select your main report name at top of Report Inspector window on the left side. Make sure you checked and selected this option from properties window :
This will make your subreport show page numbers correctly. Make sure your subreport has summary band to get results.
There is no need to pass parameters to subreport or even no need to add these textfields to subreport pages to show page numbers.
Subreports will recognize page numbers automatically.