Report Preview Error

Topics: Developer Forum, Project Management Forum, User Forum
Jul 30, 2015 at 12:04 AM
Caught .NET exception, source: PDF.AVFP 00006fjd00vm err#= 1733 line= 2 Class definition PDFRUN.PRINT2PDF is not found.1733 Class definition PDFRUN.PRINT2PDF is not found. PDFRUN.PRINT2PDF .NULL. .NULL. .NULL. .NULL. c:\aa\activevfp.dll message: c:\aa\activevfp.dll

need help please
Coordinator
Jul 30, 2015 at 1:19 PM
I think we will need a little more info, specially the code that you are using to launch the report, what version of AVFP are you using, etc.
Coordinator
Jul 30, 2015 at 8:16 PM
Sounds like you may not have done the registration and DCOM stuff for the default version. Victor's latest PDF routines do away with those requirements.
Jul 30, 2015 at 10:35 PM
i am using the ActiveVFP version 6.03

Report code is....

<%
oPDF=CREATEOBJECT("pdfrun.print2pdf")
if isnull(oPDF)
return .f.
endif
oPDF.cPSColorPrinter ="Xerox Phaser 6120 PS"
oUtil=NEWOBJECT('AVFPutilities')
  • files older than 20 Minutes(1200 ms.), erase. 3rd param is path - can be hardcoded
    oUtil.DeleteFiles('pdf',1200,oProp.AppStartPath+[Temp])
    lcCompany=oRequest.Form("Company")
    IF ISNULL(lcCompany) .OR. EMPTY(lcCompany)
    oPDF.cRecordSelect = [SELECT * from ']+ oProp.DataPath+[customer' INTO CURSOR tcursor]
    ELSE
    oPDF.cRecordSelect = [SELECT * from '] + oProp.DataPath+[customer' ]+;
    [WHERE UPPER(company)=ALLTRIM(UPPER(']+lcCompany+[')) INTO CURSOR tcursor]
    ENDIF
  • the following properties are coded for portability. They may be hardcoded instead.
    oPDF.cReport = oProp.AppStartPath+"reports\listcust.frx"
    oPDF.cPhysicalPath=oProp.AppStartPath+[Temp] &&[C:\Program Files\dotComSolution\AVFPdemo2\Temp]
    oPDF.cLogicalPath=[http://]+oRequest.ServerVariables("HTTP_HOST") +JustPath(oRequest.ServerVariables("URL"))+[/Temp/] &&[http://www.ddddd.com/avfpdemo2/Temp/]
    lcFile=oPDF.GetOutput() && generate output, return temp file name
    lcNewPath=oPDF.cLogicalPath+lcFile && new URL
    oResponse.Redirect(lcNewPath) && redirect browser to created file
    oPDF = .NULL.
    release oPDF
    %>