Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
URGENT: PDFCreator
Message
 
To
25/09/2013 16:39:25
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01583899
Message ID:
01584145
Views:
105
Yes, you need to buy at least SINGLE edition, PDF module - $79.95.
In FRX2Any.ZIP file you will find \SAMPLES\ folder with “ready-to-run” examples.
Below the code you can use to convert report into PDF file:
#DEFINE cnOUTPUT_SCREEN			         		1
#DEFINE cnOUTPUT_PRINT			         		2
#DEFINE cnOUTPUT_EMAIL			         		3
#DEFINE cnOUTPUT_FILE		 	         		4

LOCAL loFile
LOCAL lcReportFullName
LOCAL lcOutPutFileName
LOCAL lcOutPutFilePath
LOCAL lcFRX2AnyLibrary

CD LEFT(SYS(16,0), RAT('\', SYS(16,0)))

lcReportFullName = FULLPATH('..\..\Reports\Invoice.FRX')

IF !FILE(lcReportFullName)
	=MESSAGEBOX('File ' + lcReportFullName + ' does not exist.', 16, 'Error')
ELSE

	lcOutPutFileName = JUSTSTEM(lcReportFullName)
	lcOutPutFilePath = JUSTPATH(SYS(16,0)) + "\OutPut\"

	SET PATH TO  ..\..\..\
	
	lcFRX2AnyLibrary = 'FRX2Any'	 
	SET CLASSLIB TO &lcFRX2AnyLibrary IN FRX2Any.APP ALIAS FRX2Any			

	loFile = CREATEOBJ('FRX2Any.PDFFile')

	IF TYPE('loFile') = 'O'
*-- NOTE: loFile.cExportFileName should not include file extension. For example: loFile.cExportFileName = "ReportOutput"
		loFile.cExportFileName = lcOutPutFileName
*-- NOTE: loFile.cSaveFolder should contain only path to the output file. For example: loFile.cSaveFolder = "c:\MyApp\MyOutPut\"
		loFile.cSaveFolder     = lcOutPutFilePath
*-- Specifies that output file will be displayed after creation
		loFile.nOutPutType = cnOUTPUT_SCREEN
		
		loFile.SAVE(lcReportFullName)
		loFile.RELEASE()
	ENDIF

ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform