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

Printers.PrinterName AV

edited July 2006 in General
Using RB 9.03

In a Citrix environment, so I call ppPrintersRefresh to get new printers.

ppPrinters.Refresh;

ppReport.PrinterSetup.PrinterName := 'HP Laser'; <<< AV


If I don't call ppPrinters.Refresh I don't get AV but I don't have all the
printers.....

I have tried ppReport.Reset, ppReport.Printer.Initialize....

But I have not found a solution....

Is there a correct sequence to initialize and reset... or a proper sequence
to avoid the AV?

Thanks,

Walter

Comments

  • edited July 2006
    I just tested with RB 10.02 and I get the same problem...

    Look forward to any ideas.

    Thanks


  • edited July 2006

    I believe I have found a solution...

    Just create my own TppPrinter and assign it to the PrinterSetup....

    Let me know if this a good solution.

    Thanks,

    Walter
  • edited July 2006

    - make sure the you use one of the printer names listed in the
    ppReport.PrinterSetup.PrinterNames[] array:

    ppReport.PrinterSetup.Printername :=
    ppReport.PrinterSetup.PrinterNames[liIndex];

    - try adding RBuilder\Source to the Delphi library path and set the debugger
    to break on language exceptions. Then run the application under the Delphi
    debugger. When the AV occurs, Delphi will show the line of code and also you
    can check the call stack. Post the results here.



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.