FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FastReport: PDF export
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
FastReport: PDF export
Posted: Mon Sep 16, 2013 03:30 PM

Hi all,
I'm succesfully using Fastreport (spirin class) for my FWH apps.
I need to provide my customers a function to export in PDF just some pages of the report.
I know the method FrPrn:SetProperty("RTFExport","FileName",cfile) but it exports all the report, not single pages.
Any ideas ? Thanks in advance.

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: FastReport: PDF export
Posted: Mon Sep 16, 2013 03:55 PM

This is not a good solution but maybe you can create a new report that only shows the pages you want exported to the PDF.

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: FastReport: PDF export
Posted: Mon Sep 16, 2013 04:55 PM

Hi James,
it's a bit complex that way.
I checked it is easy to generate an image file for each report page.
Do you know if there is a way to generate a PDF file from FW adding tiff or jpg files ?

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FastReport: PDF export
Posted: Mon Sep 16, 2013 05:14 PM
Regards



G. N. Rao.

Hyderabad, India
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: FastReport: PDF export
Posted: Mon Sep 16, 2013 08:43 PM

Solved, thank you for the suggest Rao.

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: FastReport: PDF export
Posted: Mon Sep 16, 2013 09:18 PM

Marco, would you be so kind to post how.
Thanks in advance
Otto

Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: FastReport: PDF export
Posted: Tue Sep 17, 2013 07:55 AM

Hi Otto,
I had a single FRH report with multiple letters inside.
My target was to estract each letter from the report, convert it in a PDF document and send each via email to the recipient.

To do this I have found the following solution:
- using the method oFRH:Calc("Page#") and adding 1 when each letter is added to the report I know which is the report page number where the letter start
- when the report is complete I export it in jpg using the jpeg export method. This method automatically create multiple jpg files with the page number (example tmp.1.jpg,tmp.2.jpg...)
- due the fact I know which is the starting page no. for each letter I also know which is the name of the jpg files related, so using the FWPDF class as Rao suggested I can create a PDF merging the jpg related to the single letters.

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FastReport: PDF export
Posted: Wed Sep 18, 2013 12:46 PM

We introduced a new function
FWJPGTOPDF( aJpgFiles, cPdf )
in FWH13.08 revised build now available for download.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion