After reading Rick Strahl's White paper on VFP COM and ASP (
http://www.west-wind.com/presentations/aspobjects/ASPObjects.htm) I thought I'd try this.
I have a vfp 9.0 program that opens some dbfs, exectutes "REPO FORM myreport OBJECT TYPE 5" and creates a nice html file. I modified this code a little so the output of the "REPO FORM.." command is saved as a string of HTML code rather then to a file. I can do this with code such as this
REPORT FORM myreport OBJECT TYPE 5
lcthefilename = _oReportOutput.Item("5").TargetFilename
lctheoutput =FILETOSTR(lcthefilename )
? lctheoutput
Then I built the prg as an olepublic COM object and have the com object return the string so I can call the COM object from as asp page and display the report as html. I thought the following would work
REPORT FORM regionbudget OBJECT TYPE 5
lcthefilename = _oReportOutput.Item("5").TargetFilename
lctheoutput =FILETOSTR(lcthefilename)
return lctheoutput
Instead the return is .T.
What am I missing? Am I on the wrong track? Is there a better way to do this?
TIA for any help.