Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Export your reports to Images, RTF, PDF, HTML
Message
De
18/03/2010 18:00:18
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01446765
Message ID:
01455605
Vues:
106
>>Yes, you can merge reports, and of course create PDFs silently as well.
>>In fact, the PDF stuff was created by Luis Navas, with some very few tweaks from me.
>>Later I'll post some samples.



Naomi, just adapt the script below to your needs.
It's very simple to use, the property names are easy to understand.

First, download the foxypreviewer sources from here:
http://weblogs.foxite.com/vfpimaging/archive/2010/02/28/10127.aspx

Then, extract the files:

PR_PDFX.VCX
PR_PDFX.VCT
hpdf_consts.h
wincrypt.h
libhpdf.dll

The usage is very simple:
Local loListener As "PdfListener" Of "PR_Pdfx.vcx"
loListener = NewObject('PdfListener', 'PR_PDFx.vcx')
loListener.cCodePage="CP1252" &&CodePage

loListener.cTargetFileName = "c:\MyReport.Pdf"
loListener.QuietMode   = .T.
loListener.lCanPrint   = .T.
loListener.lCanEdit    = .T.
loListener.lCanCopy    = .T.
loListener.lCanAddNotes= .T.
loListener.lEncryptDocument = .F.
loListener.cMasterPassword  = ""
loListener.cUserPassword    = ""
loListener.lOpenViewer      = .F.

*To be Developed, not ready yet
*	loListener.MergeDocument=.MergeDocument.Value
*	loListener.MergeDocumentName=.MergeFileName.Value

* Merging 2 reports:
* 1st report, we need to set "NOPAGEEJECT", and the property "WaitfornextReport"
loListener.WaitForNextReport = .T. && Tell the listener that the PDF needs to remain opened, waiting for the next report
REPORT FORM Report1.frx OBJECT loListener NOPAGEEJECT

* Now merging the 2nd report, tell the listener that this is the last one, allowing closing the PDF
loListener.WaitForNextReport = .F. && last report, allow closing
REPORT FORM Report2.frx OBJECT loListener
Hope that helps !
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform