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

Default printer not working

edited April 2004 in General
Hello.

I'm using RB 7.03 / D6

I have my own preview screen setup, like the TrbPrintPreview program where
the user can selecta report they want - view it on screen - then press the
print button to get a hardcopy.
When the toolbar print button is pressed the command "ppViewer1.Print;" is
the only command.
When the print dialog shows: If I leave the default printer selected and
just press "OK" then the report looks like it prints, but nothing comes out
the printer.
When the print dialog shows: If I choose another printer and press OK it
prints fine - then press the toolbar print button again and when the print
dialog shows I choose the default printer again and press OK it prints fine.

It seems to me that the default printer is not loaded ready to use somehow,
is this possible?
Is there a property I have failed to setup?

Thanks for your help.
Tim

Comments

  • edited April 2004
    In article <409070e3@dm500.>, tim@snlcomputing.com.au says...
    Hello Tim

    In order to get the change of printers working for my reports - I needed
    to add the following code to the FormShow event this way - the report
    printer name was set each time.

    You should be able to modify the placement of the code to work for you.


    procedure TForm_RO_AnalysisOwnerReport.FormShow(Sender: TObject);
    begin
    ppReport_Report.PrinterSetup.PrinterName :=
    Printer.Printers[Printer.PrinterIndex];
    end; // FormShow


    --
    G. Bradley MacDonald
    bradley_AT_telus_DOT_net
This discussion has been closed.