Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Grouping output by number of pages.

edited July 2002 in General
I have a need to output reports "grouping" them by number of pages. The
senario is to print statements and an additional attachments for company
employees. The preferred output is a print-to-file or a .pdf. The reason
to "group" the output by the number of pages is to save on time and cost
during envelope stuffing (otherwise we will need to leaf through the pages
to separate the statements for mailing).

To give an example, one file would be single-page employee statements and
attachments (a total of two pages), two-page statements and attachments
would be in an additional file (three pages), and so on. Were talking
around 4,000 employees so there can be significant savings in having the
various outputs.

I've looked at setting the RangeEndCount on the pipeline as a means of doing
separate print jobs and only printing within the selected "group" for number
of pages or even trying to set a pagecount to look at on the second pass of
a twopass report. Anyone have any ideas? I haven't looked at trying to
mess with archive files and see if there would be a way to print each
statement individually, look at a number of pages and group them, then
output them by the page groupings.

Any help would be appreciated.

Thanks,

Kent

Comments

  • edited July 2002
    Here is a demo whichs allows you to print select number of pages in batches:

    http://www.digital-metaphors.com/tips/PrintingInBatches.zip


    Cheers,

    Jim Bennett
    Digital Metaphors Corp.

  • edited July 2002
    Not quite what I am looking for, but I can probably use the created output
    device method. I guess I would run the report per employee and store the #
    of pages and employee IDs in a list then rerun the reports in groups by # of
    pages.

    Just to restate the problem; I am looking to see a way of identifying the
    number of pages in a report group and be able to create the output in groups
    of those pages. So if a company has 100 employees, I would be able to run
    statements for the employees and be able to tell how many pages a statement
    is going to be for an employee. I would then be able to take the groups of
    these pages (say 50 employees will have a single page statement, 30 will
    have 2 page statements, and 10 will have 3 page statements) and output them
    to different files (total of 3 different files). Since I don't know how
    many pages an employee will get until the report is generated, I was trying
    to see if there might be a method to doing this or if the question has been
    raised before.

    Thanks for your help,

    Kent

  • edited July 2002
    You can generate the report.PassSetting to psTwoPass. This way the report
    will generate all pages when the screen preview is first displayed. Use the
    Group.AfterGroupBreak to read the Report.AbsolutePageNo to get the ending
    page number for a group. Since, the groups are start on new page groups,
    you can assume that the next group starts on the next page. In the first
    pass, you can build a list of objects in a TList which store the group value
    and the start page no and end page no for each group. Then in the second
    pass (to the screen/printer) you can show a dialog before the print process
    is started (as shown in the demo) to limit the pages by selecting a page
    range from the lists that you've built in the first pass.

    --
    Cheers,

    Jim Bennett
    Digital Metaphors Corp.

This discussion has been closed.