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

Printing Invoices

edited November 2001 in General
I have a single report that prints customer invoices in sets. We are sending
the invoice report to a mail house to do the actual printing, so I print to
a file that the mail house can use. My problem is that I need to split the
report into 2 files:

The first file has all invoices that are 6 pages or less.
The second file has all invoices that are 7 or more pages long.

Is it possible to print to different files (or printers) based on the number
of pages in a set? If I can't do it in one run, then I'm happy to do it in 2
runs. In this case how do I stop the invoices that are more than 7 pages
from printing when I only want the <=6 page invoices printed, and vice
versa?

Thanks,
Scott Cree.

Comments

  • edited November 2001
    Run the report once to determine the page requirements of each invoice.
    Then change the data going into the report for each output file and reprint
    for each one.

    You will have to set the Report.PassSetting to twopass. In the first pass,
    you will need to track the starting and ending page number of each invoice.
    Build a couple of lists to determine which records should be included in
    each report. You should then build a soft coded sql query to search for
    these records for each set of invoices. Then reprint the report to each
    text file. Remember to set the TextFilename property between prints.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.