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

Setting another printer problem

edited July 2002 in General
Hi all,

have such question: we use ReportBuilder, and we use several printers in our
application. Depending on whatprinter is associated with report we set it.
in such way:

Report.PrinterSetup.PrinterName := ' e.g. Leo\\HP 1200';

but this causes problem when running this line first time for another
printer - it takes many time. from 5 to 30 seconds (we have different
results in different networks and printers). printing report next time
without leaving program takes about 20 msec on this line.

any suggestions?

Thank you,
Eug

Comments

  • edited July 2002
    When the printer name is assigned, the entire print driver is loaded.
    Sometimes this takes times, especially on network printers. However, once
    the driver is loaded, settings for the printer are saved within the
    application, so that subsequent printing to that printer will be faster. If
    it takes a long time to retrieve the DC, then there's not much that can be
    done for the speed, since the DC must be retrieved for each individual run
    of a report. Usually though, it's the initial load of the print driver that
    takes time.

    Of course, once you shut-down the application, all RB caches are freed. I
    don't think there's going to be a way to make it faster between runs of the
    application.

    To make it faster within a given application instance, you could dedicate a
    report to the printer it is assigned to. Then use LoadFromFile or
    LoadFromDatabase to load the definition you want for the given printer.
    With this technique you would store a list of reports, one for each printer
    needed.

    Cheers,

    Tom Ollar
    Digital Metaphors Corporation
This discussion has been closed.