hi willy

the option is available since 3.5.3

Report.Print(optional MyPrinter as printer)

if printer is defined then the configure box will not show.


dim hprinter as new printer

hprinter.name = HP-LaserJet

report.print(hprinter)


2014-05-05 17:39 GMT+02:00 Willy Raets <[email protected]>:
> 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
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
> &#149; 3 signs your SCM is hindering your productivity
> &#149; Requirements for releasing software faster
> &#149; Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> _______________________________________________
> Gambas-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gambas-user



-- 
Fabien Bodard

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to