Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print2PDF Webservice error
Message
 
To
02/05/2005 01:00:00
General information
Forum:
Visual FoxPro
Category:
ActiveVFP
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01010076
Message ID:
01010093
Views:
19
The key is to put that code in a COM exe and call it from your VFP mtdll web service. I have tested it successfully from ASP/ASP.NET on XP Pro and ASP.NET on Windows 2000 Server. As Arto said, there was a problem on Windows 2000 when running from ASP, similar to yours. You may want to download the Amyumni PDF generator and substitute it to see if that works...
>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 '<>'
>ENDTEXT
>
> m.lnNewHandle = SQLConnect('Melody','sa','gandalf',.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.
Previous
Reply
Map
View

Click here to load this message in the networking platform