grototo Posted March 18, 2019 Share Posted March 18, 2019 Hi Folks,gotta weird need, and I can't seem to find a solution.Main report :calling subreport 1 in detail1 sectioncalling subreport 2 in detail2 sectionusing pagefooter to print "page 1.x", where x shall be the page number from the subreport.For instance, if subreport 1 prints 3 pages at first time, page number should be 1.1, 1.2 and 1.3.And so on....Starting again from 1.1, 1.2, aso for each brand new objet of the list given to each subreports.I tried using different evalution times, but I can't get it working.Never used returned parameters, 'cause I can't get how it works.Any help would be appreciated ;)Best regards,Thomas Link to comment Share on other sites More sharing options...
C-Box Posted March 19, 2019 Share Posted March 19, 2019 For usage of ReturnVariables that's not so difficult. You will need to define a Variable let's call "SR_TotalPageNumber" in your MainReport.At your SubReport-Element you create the mapping within the ReturnVariables, where you define which source-variable from SubReport will be transferred to what target-variable in MainReport... so $V{PAGE_NUMBER} (that is incremented individually from (each) SubReport) must be mapped to $V{SR_TotalPageNumber} (in MainReport)In your MainReport you can now use as PageXbyY Expression SV{PAGE_NUMBER} + "." + $V{SR_TotalPageNumber} and set the Evaluation-Time to PAGE for that textfield. But in your case you will recognize that the ReturnVariables are evaluated when the SubReport returns... so this will just happen at the SubReport-End, so when it's finished rendering it's own pages. So probably the trick with ReturnVariables won't work. So I would recommed to use some groups instead, there you could adjust that the PageNumbers will be resetted when the Group breaks! So I guess this will fit more your needs.Just give it a try! Otherwise you could also render the page-footer within the SubReports itself.... there you have it's own total-page-numbers of course. But then you should also redesign your MainReport and let the SubReports RunToBottom probably (so not sure if this is feasible in your case)What also could work... create a group for the SubReport(s) and place the SubReport(s) into the groupfooter(s) instead of the detail(s). Now you could also try to set the Evaluation-Time of your PageXbyY-Element to "Group" and select the named group. (also just an idea, not tried/proofed)hth + regardsC-Box Link to comment Share on other sites More sharing options...
grototo Posted March 20, 2019 Author Share Posted March 20, 2019 Hi C-Box, thanks for your answer and the time spent.I'll try what you mentionned asap.Regards,Thomas Link to comment Share on other sites More sharing options...
grototo Posted March 20, 2019 Author Share Posted March 20, 2019 Hi there, just to let you know I found another solution : told each subreport to RunToBottom, and added a page footer giving page number in each oh them. Seems to work for the moment.Regards,Thomas Link to comment Share on other sites More sharing options...
C-Box Posted March 20, 2019 Share Posted March 20, 2019 fine that it works. So it wasn't "another" solution ... but the second Idea I've mentioned:. Otherwise you could also render the page-footer within the SubReports itself.... there you have it's own total-page-numbers of course. But then you should also redesign your MainReport and let the SubReports RunToBottom probably (so not sure if this is feasible in your case) ;-)regardsC-Box 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