Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Close a PDF Document
Message
From
17/04/2008 12:02:54
 
 
To
16/04/2008 19:58:32
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01311299
Message ID:
01311475
Views:
24
Here's a code example from one of my programs, in the case of 'loxfrx.targetType' = 'PDF' then it will create a PDF.
*-- For these have to create a file
IF INLIST(tcFile_Action,'PRINT','FAX','EMAIL') AND tcSend_To <> 'PRINTER'
	IF EMPTY(tcDirectory)
		IF DIRECTORY('TEMP')
			*-- current drive + default directory
			tcDirectory = SYS(5)+SYS(2003)+'\Temp\'
		ENDIF
	ENDIF

	local loSession, lnRetval
	loxfrx = XFRX("XFRX#LISTENER")
	loxfrx.targetType = tcSend_To
	loxfrx.targetFileName = RTRIM(tcDirectory)+RTRIM(tcFileName)
	loxfrx.DoNotOpenViewer = .T.
	lnRetval = loxfrx.SetParams()

	IF lnRetval = 0
		WAIT WINDOW 'Running report: '+tcReport+CHR(13)+;
					' Send To: '+loxfrx.targetType+CHR(13)+;
					' Filename: '+loxfrx.targetFileName+CHR(13)+CHR(13)+;
					' Range: '+tcRange NOWAIT
		REPORT FORM (tcReport) &tcRange OBJECT loxfrx
	ELSE
		=MESSAGEBOX("Error Printing Report!",16,"Error Code: "+ALLTRIM(STR(lnRetVal)))
	ENDIF
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform