saman0suke Posted January 5, 2011 Share Posted January 5, 2011 Hi guys, I have a problem ,and I don't know how to solve it, I'm creating a report with 5 subreports, all of them in the summary band, and a "main" table in the Detail band, everything is working, except for the page numbers, because I put them in the PageFooter band but they are only visible on the first page (Detail band), and when the summary starts on the second and third page(in my case) I cannot see the page numbers, is there any way that I can add page numbers on Summary band? I'm using iReport 3.0.0, thank you, and have a nice day.Post Edited by saman0suke at 01/05/2011 21:57Post Edited by saman0suke at 01/05/2011 21:57 Link to comment Share on other sites More sharing options...
cbarlow3 Posted January 6, 2011 Share Posted January 6, 2011 In the Report Inspector pane, try selecting the root node of the tree (the name of the actual report). Then, in the Properties pane, check the box "Summary with Page Header and Footer. I didn't realize it before, but apparently"By default the summary band has not the page header and footer. With this property it is possible to force to print the page header and footer in the summary band (in general when this band appears on a separated page)."Hope that helps,Carl Link to comment Share on other sites More sharing options...
saman0suke Posted January 7, 2011 Author Share Posted January 7, 2011 I'm using iReport 3.0.0(by the company's demand) and I don't see that option, I'm asuming is on the latest versions, right? thanks for the tip, I will look into that and post my results. Link to comment Share on other sites More sharing options...
ronyrv Posted March 2, 2011 Share Posted March 2, 2011 Hi,I'm having the same problem, i tried this solution and i got this exception:com.jaspersoft.jasperserver.api.JSExceptionWrapper: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'isSummaryWithPageHeaderAndFooter' is not allowed to appear in element 'jasperReport'.By the way i am using iReport 3.7, JasperServer 3.5... Any ideas about this exception? Link to comment Share on other sites More sharing options...
cbarlow3 Posted March 2, 2011 Share Posted March 2, 2011 Sounds like it must have been a newer feature. You can use the compatibility mode to try to keep you from generating any code in iReport 3.7 that won't run in JasperReports Server 3.5, but then of course that still doesn't solve your original problem of wanting to have the header and footer appear on the summary page. Hence the enhancement.Unfortunately, I don't know of a good way to fake the enhancement prior to updating to 3.7 on the server side.Carl Link to comment Share on other sites More sharing options...
ronyrv Posted March 2, 2011 Share Posted March 2, 2011 Thanks Carl, I am wondering if is there a way to "trick" this type of behavior for jasper 3.5, i am new on ireport and i am trying to speed up myself to get all this knowledge asap or if is there a documentation that you can recommend. I will appreciate your advice Link to comment Share on other sites More sharing options...
zwseow Posted June 20, 2014 Share Posted June 20, 2014 Placed answer below instead. Just found commenting =/= posting answer Link to comment Share on other sites More sharing options...
zwseow Posted June 20, 2014 Share Posted June 20, 2014 Ok this answer comes a bit late to all users of iReport 3.0.0 / all iReport versions without enhanced features. First create a parameter "pageLast" to be passed from the main report to the summary sub-report.Pass $V{PAGE_NUMBER} of the main report to the parameter. Then create 2 text field boxes just like you would for the normal page numbers in the sub-report.1st box: "Page "+new BigDecimal($P{pageLast}.doubleValue()+$V{PAGE_NUMBER}.doubleValue()-1)+" of"2nd box: " " + new BigDecimal($V{PAGE_NUMBER}.doubleValue() + $P{pageLast}.doubleValue()-1) Finally, in your main report, make the sub-report as big as it can go (i.e. until the program tells you it's too big).This ensures the sub-report's page numbers are correct, meaning it only works for single sub-reports.......i havent tried multiple sub reports yet. Link to comment Share on other sites More sharing options...
anki495 Posted August 21, 2015 Share Posted August 21, 2015 I have been trying this but i am not able to solve the mentioned problem although i am selecting summary with header and footer checkbox in ireport5.6.0 Link to comment Share on other sites More sharing options...
sehala.sarkar Posted September 17, 2017 Share Posted September 17, 2017 Many thanks cbarlow3. It worked Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now