Inserting blank pages where sub-report is an odd number of pages in length

  • Hi, I have a sub-report inside a list control

    The sub-report is a statement, the main report renders a batch of statements within a list control. The finished report is then exported as a single pdf

    Where a statement (sub-report) is an odd number of pages in length, I want a blank page inserted before the next statement (sub-report)

    I know I cannot use page numbering on the sub-report itself as this cannot be referenced anywhere else other than in a header or footer. I had thought I might be able to reference a page number in a sub-report footer from the main report

    However sub-report headers and footers are stripped away when rendered in the main report

    Anyone have any ideas how I might guarantee that each statement with the batch is an even number of pages in length?

    All the best

    Duncan


    All the best,

    Duncan

  • Duncan Lawrence - Friday, June 23, 2017 4:18 AM

    Hi, I have a sub-report inside a list control

    The sub-report is a statement, the main report renders a batch of statements within a list control. The finished report is then exported as a single pdf

    Where a statement (sub-report) is an odd number of pages in length, I want a blank page inserted before the next statement (sub-report)

    I know I cannot use page numbering on the sub-report itself as this cannot be referenced anywhere else other than in a header or footer. I had thought I might be able to reference a page number in a sub-report footer from the main report

    However sub-report headers and footers are stripped away when rendered in the main report

    Anyone have any ideas how I might guarantee that each statement with the batch is an even number of pages in length?

    All the best

    Duncan

    Any chance at providing the sub-report with a parameter that identifies the current page number in the overall report?   Assuming that turns out to be possible, you could then do some pagination at the end of the sub-report that's conditional on the basis of that parameter value being odd or even.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • Steve hi, thanks for the contribution
    At the moment the main report passes an ID and two dates to the sub-report. Are you suggesting passing another value, the page number as a fourth parameter?
    I had thought the last process on rendering a report was pagination. Would this not preclude passing the page number to the sub-report as the main report had not fully rendered until all the statements in the batch had been processed?
    Thanks
    Duncan


    All the best,

    Duncan

  • Duncan Lawrence - Thursday, June 29, 2017 5:47 AM

    Steve hi, thanks for the contribution
    At the moment the main report passes an ID and two dates to the sub-report. Are you suggesting passing another value, the page number as a fourth parameter?
    I had thought the last process on rendering a report was pagination. Would this not preclude passing the page number to the sub-report as the main report had not fully rendered until all the statements in the batch had been processed?
    Thanks
    Duncan

    Don't know.   Can't recall that level of detail.   Would be a fairly simple change and easy enough to back out of, so it's probably worth testing.  Alternatively, if you know exactly how many rows in the main report appear on every output page, you might be able to adjust the dataset query to use that knowledge to assign a value in every row that indicates what page it's on, except that such might not be able to account for the space occupied for each subreport.   Another way to go might be to let the dataset handle ALL the data, so that a subreport isn't really necessary.   You just have the necessary sections and rather a lot more control going into section hiding, and generate supporting data in the dataset that can help the report paginate properly, and still look the same way it does with the subreport.   That last would require quite a bit more effort, however.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply