Limiting page count in Reporter

  • What would be the easiest way to limit the number of pages in the reporter? When designing, I sometimes have a run-away report with lots of pages, and I'd like to have a limit of perhaps 20 pages and then have my code stop. I note the TWPSuperMerge AfterProcessGroup has an Abort, which is used to stop the band working. How can I find out how many pages are in the result at this point?

    Thanks, Matthew

  • Thanks - I thought you might say that. Unfortunately I might have 600 items, and those could either be a single name and value in three columns on the page (2 pages) or one item taking over two pages (800 pages). Thus some way to intrude on the laying out would be handy to get 10 pages max or something.

    If not possible, please consider an event that allows termination each time you get to a new page. Thanks!

    Matthew

    • Offizieller Beitrag

    Hi,

    >> If not possible, please consider an event that allows termination each time you get to a new page. Thanks!

    WPReporter never "gets to a new page" but you could reformat (ReformatAll) the destination text in any of the events and then use "PageCount". So you could abort the process when the page count is >10. ReformatAll should not be called too often.

    Julian