[Gambas-user] gb.report2 save to pdf

Johny Provoost johny.provoost at skynet.be
Mon Feb 5 17:15:54 CET 2018


OK, thanks

I'll do it like this.



Op 05-02-18 om 16:54 schreef Gianluigi:
> It seems we can not print directly in the correct way, see here [0], 
> otherwise you could obtain it like this:
>
> Public Sub SavePDF()
>
>   Dim sPath As String
>   Dim hReport1 As New Report1
>   Dim hPrinter As New Printer
>
>   sPath = "/tmp/test.pdf" '<===============
>   hPrinter.Orientation = hPrinter.Portrait
>   hPrinter.Resolution = 150
>   hPrinter.Paper = hPrinter.A4
>   hPrinter.OutputFile = sPath
>   hReport1.Print(hPrinter)
>   ' Print "Report is saved"
>   Balloon.Info("Report is saved", FMain)
>
> End
>
> Regards
> Gianluigi
>
> [0] 
> https://lists.gambas-basic.org/cgi-bin/search.cgi?q=Set+name+in+gb.report+preview
>
>
> 2018-02-05 16:31 GMT+01:00 Johny Provoost <johny.provoost at skynet.be 
> <mailto:johny.provoost at skynet.be>>:
>
>     Hallo,
>
>     In gb.report2 I want to change the name and path when I save the
>     file as pdf through a variable, but I can't seem to find out how
>     or if it's possible.
>
>     Can someone please show me the way?
>
>     Thanks,
>
>     Johny
>
>     --------------------------------------------------
>
>     This is the Gambas Mailing List:
>     https://lists.gambas-basic.org/listinfo/user
>     <https://lists.gambas-basic.org/listinfo/user>
>
>     Search the list:
>     https://lists.gambas-basic.org/cgi-bin/search.cgi
>     <https://lists.gambas-basic.org/cgi-bin/search.cgi>
>
>     Hosted by https://www.hostsharing.net
>
>
>
>
> --------------------------------------------------
>
> This is the Gambas Mailing List:
> https://lists.gambas-basic.org/listinfo/user
>
> Search the list:
> https://lists.gambas-basic.org/cgi-bin/search.cgi
>
> Hosted by https://www.hostsharing.net

-- 

------------------------------------------------------------------------

*Vriendelijke Groeten*

*Johny Provoost*

*mailto: **johny.provoost at skynet.be* <mailto:johny.provoost at skynet.be>

*mailto: **johny.provoost at gmail.com* <mailto:johny.provoost at gmail.com>

*Website:*http://www.jepe.be <http://www.jepe.be/>or 
http://www.johnyprovoost.net <http://www.johnyprovoost.net/>



More information about the User mailing list