[Gambas-user] gb.report question on setting printer to print to
Willy Raets
willy at ...2734...
Mon May 5 17:39:58 CEST 2014
Hi all,
I have this situation where I have multiple printers available.
Say they are named HP-LaserJet (default) and HP-Color.
I do not want a Report Preview but print directly to either one of both
printers available to the system.
Now most reports I made need to go to the default printer being
HP-LaserJet.
In Gambas I have a RprtPrintTo1 and RprtPrintTo2
So next code will work and print the RprtPrintTo1 to printer HP-LaserJet
(as it is the default):
Dim hReport As New RprtPrintTo1
hReport = New RprtPrintTo1
hReport.Paper = Printer.A4
hReport.Print
But some reports (like RprtPrintTo2) are specific for the printer
HP-Color (not being the default printer).
Code below will send it to HP-LaserJet (default) instead of HP-Color.
Dim hReport As New RprtPrintTo2
hReport = New RprtPrintTo2
hReport.Paper = Printer.A4
hReport.Print
How can I have the report printed to HP-Color? I can't find any property
in Report that I can set the printer to print the report to and I don't
want to use hReport.Preview. Documentation wasn't helpful either.
Using Gambas 3.5.2
--
Kind regards,
Willy (aka gbWilly)
http://gambasshowcase.org/
http://howtogambas.org
http://gambos.org
More information about the User
mailing list