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

Printing error

edited February 2003 in General
Hi,

We have the following problem.

If in some cases if the printerdriver is not installed properly, or corrupt,
and report builder tries to print to this printer, our whole application
seems to hang an this results in corrupt tables etc.
Is there a wat to just send the document to the printer and when the printer
is not ready, or the print job is not handled properly you just get a
message or just end the print job?

Something like printing in another thread, and use a timer to destroy this
thread after a long time if the printing is not done. Or put a try except
around the print command?
I don't have any experience with this. Can anyone give me some advice?

We use Delphi 6, ReportBuilder 6.02.
Our customers have different windows versions and printers.

Thanks in advance,

Wim Looman

Comments

  • edited February 2003
    You will be interested in our next release:) RB 7.02 will be able to print
    the report in a background thread. There will be a BackgroundSettings
    property you can set on the report. This will enable a checkbox on the print
    dialog so that your users can choose to print in a background or not. Then
    call Report.Print as you normally would. Your main application can continue
    running while the background thread tries to print. If the report cannot
    print due to a corrupt driver or other issue, then the thread will be freed
    when it is terminated. You will also be able to cancel all background print
    requests from the main thread (your app) with a cancel call on our
    background print manager singleton object. There should be a demo and help
    topic to describe this in more detail upon release of RB 7.02. The
    background printing feature will support all output devices (except the
    screen device of course).


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited February 2003
    Hi Jim,


    sounds great!

    Cheers,
    Chris Ueberall;
  • edited February 2003
    Thanks, thats what i wanted.

    Wim.

This discussion has been closed.