[Gambas-user] Gb.Report2 (and printing .pdf)

Frank fgores at ...174...
Mon Apr 6 10:52:15 CEST 2015


With repect to printing in Gambas, I have the following (unfinished) code

a FMain with two buttons, Btprint which prints the report hReport1 as it should, and a button Brprintpdf which should print the same hReport to file as .pdf. I know there is code to print to .pdf missing as it saves a blank pdf, but as a newbee I have no clue what is missing
I suspect it must be something with draw and a event with a printer component on hReport1, right?

Public Sub _new()

End

Public Sub Form_Open()
Me.Center
End

Public Sub Btprint_Click()

   Dim hReport1 As New Report1
   
   hreport1 = New Report1
   hreport1.paper = Printer.A4
   hreport1.Orientation = Printer.Landscape
   hreport1.Print

End


Public Sub Btprintpdf_Click()
  
Dim hprinter As New Printer

  With hPrinter
    .Configure
    .Orientation = Printer.Landscape
    .Resolution = Desktop.Resolution
    .Paper = 2
    .OutputFile = "/home/frank/test999.pdf"
    .Print
  End With
End

On 05.04.2015 15:04, Roki wrote:
> I apologize that I enter in your topic, but my question is also related
> to gb.report2. I have a problem with the panel, although its arrangement
> properties set to None, its child controls are grouped in the upper left
> corner.
>
> Is this a bug, or am I doing something wrong ?
>
> I'm currently using the Gambas 3.7
>
> On 04.04.2015 21:24, Fabien Bodard wrote:
>> Hum, if i remember well i have corrected this bug. So in version 3.7.1
>> or .2 it will be ok
>>
>> 2015-04-04 18:51 GMT+02:00 Johny Provoost <johny.provoost at ...27...>:
>>> Op 04-04-15 om 17:58 schreef Frank:
>>>> On 04.04.2015 17:49, Johny Provoost wrote:
>>>>> Op 04-04-15 om 12:44 schreef Frank:
>>>>>> Hello Everybody,
>>>>>>
>>>>>> I've seen that the new gb.report component uses now documentviewer as
>>>>>> where I until now could use "report.preview()" it now fails. As I have
>>>>>> made a few reports in my application I would appreciate a working method
>>>>>> to produce a preview and where I can save this preview as .PDF (like I
>>>>>> did sofar) As I amquit new to Gambas but still learning, I am now lost
>>>>>> again a bit.
>>>>>> btw, I have looked at the example of Fabien but is this more for
>>>>>> excisting .PDF files or can I use this as well to generate for my reports?
>>>>>>
>>>>>> Kind regards,
>>>>>>
>>>>>> Swissgamba
>>>>>>
>>>>>>
>>>>> Don't you have a second TAB (first is print, second is File) in the
>>>>> preview window?  There you normally can Print the file as pdf.
>>>> btw these are the lines:
>>>>
>>>> reportor = New Rptoffenerechnung
>>>> reportor.preview()
>>>>
>>>> the error is: Error: Wanted picture, got function instead
>>>> ------------------------------------------------------------------------------
>>>>
>>>>
>>> Sorry, can't help you with that.  Think we have to wait for Fabian.
>>> --
>>>
>>>
>>>
>>> *Vriendelijke Groeten*
>>>
>>> *Johny Provoost*
>>>
>>> *mailto: johny.provoost at ...27... <mailto:johny.provoost at ...27...>*
>>>
>>> *mailto: johny.provoost at ...626... <mailto:johny.provoost at ...626...>*
>>>
>>> *Website:* *http://www.johnyprovoost.net* <http://www.johnyprovoost.net/>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
>>> by Intel and developed in partnership with Slashdot Media, is your hub for all
>>> things parallel software development, from weekly thought leadership blogs to
>>> news, videos, case studies, tutorials and more. Take a look and join the
>>> conversation now. http://goparallel.sourceforge.net/
>>> _______________________________________________
>>> Gambas-user mailing list
>>> Gambas-user at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>





More information about the User mailing list