> Hello All
>
> I use the htmllistener class from ffc classes in my project
> The problem is that when i try to run the exe from a machine running Windows 2003 server i get the error
> ox is not an object.
> the code i execute is:
>
> PROCEDURE CreateReport_HTML(Reportname,HtmlFile,NshowFile,ReportFilter)
> SET CLASSLIB TO \foxpro\librarie\_reportlistener additive
> ox = CREATEOBJECT('htmllistener')
> ox.QuietMode =.F.
> IF VARTYPE(HtmlFile)!='C'
> ox.TargetFilename='C:\temp\myreport.html'
> ELSE
> ox.TargetFilename=HtmlFile
> ENDIF
> ox.AllowModalMessages=.F.
> IF VARTYPE(ReportFilter)='C' AND NOT EMPTY(ReportFilter)
> REPORT FORM (reportname) FOR &ReportFilter OBJECT ox
> ELSE
> REPORT FORM (reportname) OBJECT ox
> ENDIF
>
> IF VARTYPE(NshowFile)='N' AND NshowFile=1
> ox.ShowFile()
> ENDIF
> ENDPROC
Where is this library ? SET CLASSLIB TO \foxpro\librarie\_reportlistener additive
i tweaked a bit your code (i cut some conditions i cannot replay here)
SET CLASSLIB TO home()+"ffc\_REPORTLISTENER.VCX"
ox = CREATEOBJECT('htmllistener')
ox.QuietMode =.F.
IF VARTYPE(HtmlFile)!='C'
ox.TargetFilename='C:\zyreport.html'
ELSE
ox.TargetFilename=HtmlFile
ENDIF
REPORT FORM ? OBJECT ox
loShell = newobject('_shellexecute', home() + 'ffc\_environ.vcx')
loShell.ShellExecute(ox.TargetFileName)
release classlib home()+"ffc\_REPORTLISTENER.VCX"
it works like this.
i recommend you to se the solutions samples relative to reportListener in this location (with html, xml output)
C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 9\SAMPLES\SOLUTION\EUROPA\HTMLXMLOUTPUT.SCX
Dont rate please.its only for the pleasure to help.Give me only a feed back.
Yousfi Benameur