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

Access violation when adding printer...

edited December 2001 in General
This is more of a bug report. Open the report designer and add a new printer
while the designer is open (make sure the added printer is set as default
printer). After this is done, press the print button on the preview pane.
You will get an access violation in ppPDlg, line 405 (RB 6.03). If the
printer is not set as default, no error occurs, but it does not show up in
the printer selection until the application is restarted.

Cheers, Marco...
-------------------------------------------------------------------
Marco Heine
QUMAS
Enterprise Compliance Management
Visit our Website: www.qumas.com

Comments

  • edited December 2001
    This only happens when an application is running. What you can do is add
    ppPrinters.Refresh to the Report.BeforePrint event. Add ppPrintr to your
    uses clause. RB gets the printer info from the windows registry. We have no
    timing to know when this is changed when RB is running in an application. RB
    caches the available printers, and calling ppPrinters.Refresh will clear
    this cache and retrieve the printer list again.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited December 2001
    Thanks Jim, worked like a charm. Silly question though, why aren't you using
    it yourself when the printing button is pressed in the preview screen? :)

    Cheers, Marco...
    -------------------------------------------------------------------
    Marco Heine
    QUMAS
    Enterprise Compliance Management
    Visit our Website: www.qumas.com

  • edited December 2001
    We don't use it by default because it would get fired everytime the report
    is printed, which isn't the most efficient thing to do, that's all.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.