Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print2PDF - Webservice
Message
From
02/05/2005 00:07:49
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveVFP
Title:
Print2PDF - Webservice
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01010075
Message ID:
01010075
Views:
74
Hi everyone

I'm having a problem when a try to print a report from my webservice. I'm using de code of ActiveVFP (PDFRUN.exe) to print my reports and convert them in PDF. Everything seems to be righ, even the pdf file is generated, but with 0 bytes. I don't know if I need an additional program or file???.

The code of the procedure in the dll is the following:


********************/ packing list Report/***********************

Procedure grow_packing_report(lcPacking_uq As String) As String
Local m.lcReturn As String
Local loXMLAdapter As Xmladapter
Local lcXmlPackRepo As String

Try
Set Textmerge On
Set Console Off
TEXT TO lcsql_calls
execute sp_flower_ws_packing_report ?lcPacking_uq
ENDTEXT

m.lnNewHandle = SQLConnect('DSN','sa','password',.T.)

If m.lnNewHandle > 0
m.lnRet = SQLEXEC(m.lnNewHandle, lcsql_calls, 'vr_Packing_repo')
If lnRet < 0
= Aerror(aErrorArray)
lcReturn = This.odbc_error(@aErrorArray)
Throw lcReturn
Endif
SQLDISCONNECT(m.lnNewHandle)

Select vr_Packing_repo
m.lcPDF = "c:\eisvisualsystems\web_services\grow_reports\"
m.lcFRX = "c:\eisvisualsystems\reportes\ventas\ws_packing_grower.frx"


oPDF = Newobject('pdfrun.print2pdf')
oPDF.cReport = m.lcFRX
oPDF.cPhysicalPath = m.lcPDF
lcXmlPackRepo=oPDF.GetOutput()
Else
Throw 'No hay conección con la base de datos.'
Endif

Catch To loError
lcXmlPackRepo = This.Exception_Error(loError)
Finally
oPDF = .Null.
Release oPDF
Endtry
Return lcXmlPackRepo
Endproc


Thank you for your help.
Carlos A. Miranda
E.I.S.lnc
President
Reply
Map
View

Click here to load this message in the networking platform