Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
URGENT: PDFCreator
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01583899
Message ID:
01584804
Vues:
83
Easy and powerfull.




>>>I use FoxyPreviewer which creates a PDF with just two lines of code. http://foxypreviewer.codeplex.com/
>>>
>>>And don't be fooled by the name, it's a complete report writer.
>>>
>>>>Need to convert application to Windows 7 and PDFCreator is available in the company image.
>>>>The function below supposed to output report to PDF:
>>>>
>>>>
>>>>FUNCTION PrintPDFReport
>>>>	LPARAMETERS lcReport, lcOutputFile, lcExtraReportClauses
>>>>	LOCAL lcOldPrinter
>>>>
>>>>	* save old printer, will be restored in the end of routine
>>>>	lcOldPrinter = SET("printer",2)
>>>>	* create object of the class
>>>>	oPDFC  = CREATEOBJECT("PDFCreator.clsPDFCreator","pdfcreator")
>>>>	* setup class parameters
>>>>	oPDFC.cStart("/NoProcessingAtStartup")
>>>>	oPDFC.cOption("UseAutosave") = 1
>>>>	oPDFC.cOption("UseAutosaveDirectory") = 1
>>>>	oPDFC.cOption("AutosaveFormat") = 0
>>>>	* select PDFCreator as a default printer
>>>>	DefaultPrinter = oPDFC.cDefaultprinter
>>>>	oPDFC.cDefaultprinter = "PDFCreator"
>>>>	oPDFC.cClearCache
>>>>	ReadyState = 0
>>>>	oPDFC.cOption("AutosaveFilename") = JUSTFNAME(lcOutputFile)
>>>>	oPDFC.cOption("AutosaveDirectory") = JUSTPATH(lcOutputFile)+'\'
>>>>	oPDFC.cprinterstop=.F.
>>>>
>>>>	lcExtraReportClauses=IIF(EMPTY(lcExtraReportClauses),"",lcExtraReportClauses)
>>>>
>>>>	REPORT FORM (lcReport) &lcExtraReportClauses TO PRINTER NOCONSOLE
>>>>
>>>>	INKEY(5)
>>>>	* restore the old printer
>>>>	SET PRINTER TO NAME (lcOldPrinter)
>>>>	oPDFC.cDefaultprinter = DefaultPrinter
>>>>	oPDFC.cClearCache
>>>>	oPDFC.cClose()
>>>>	RELEASE oPDFC
>>>>ENDFUNC
>>>>
>>>>
>>>>Questions: 1. Should I redirect to PDFConvert printer using SET PRINTER TO PDFConvert?
>>>>2. When I need to convert multiple file, it only converts the 1st file.
>>>>
>>>>Any thoughts? Did somebody use successfully PDF Convert? Any other solutions that I can easily implement (IT folks push the upgrade)?
>>>>Thanks in advance
>>
>>Thanks Tore,
>>Quick question: can you run multiple reports to PDf in the loop? Do you have any code to share? Will very much appreciate?
>
>Hi Jerry,
>
>I am just about to go to bed, so this is just a quick reply. Please check http://foxypreviewer.codeplex.com/documentation where you will (hopefully) find all the information you need. You may be surprised about how easy it is to use FoxyPreviewer.
Dominican Republic, a Paradise in America
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform