Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Yousfi Benameur
  Where is Yousfi Benameur?
 El Bayadh
 Algeria
 Yousfi Benameur
 To: Alex Arvanitou
  Where is Alex Arvanitou?
 Athesn
 Greece
 Alex Arvanitou
 Tags
Subject: RE: Htmllistener
Thread ID: 232105 Message ID: 232108 # Views: 45 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Reports and Printers
Date: Friday, June 19, 2009 7:00:59 PM         
   


> 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



COMPLETE THREAD
Htmllistener Posted by Alex Arvanitou @ 6/19/2009 5:50:07 PM
RE: Htmllistener Posted by Yousfi Benameur @ 6/19/2009 7:00:59 PM
RE: Htmllistener Posted by Alex Arvanitou @ 6/22/2009 5:48:10 PM
RE: Htmllistener Posted by Frank Cazabon @ 6/22/2009 7:06:08 PM
RE: Htmllistener Posted by Alex Arvanitou @ 6/23/2009 5:14:24 PM