My goal is to have foxpro scan down a table of tickers and pass the ticker to a crystal report. For now, I have just hardcoded IBM as my ticker. The crystal report connects to a sql server.
I have never done this before, and am really not a programmer, but have come up with the following code:
lnConn = SQLCONNECT("JIC_Web_Project",.T.)
SQLCONNECT(lnconn)
CRApplication = createobject("CrystalRuntime.Application")
CRReport = createobject("CrystalRuntime.Report")
CRReport = CRApplication.OpenReport("report_name",1)
ocParm = CRReport.ParameterFields()
oParm = ocParm.Item(1)
oParm.SetCurrentValue("IBM")
CRReport.PrintOut()
When running the report, I get to the print box (which I need to figure out how to turn off) but after selecting the print option, I get the following message: "ole idispatch exception code 0 from crystal reports active x designer: server has not yet been opened".
Thanks for any help.
I have never done this before, and am really not a programmer, but have come up with the following code:
lnConn = SQLCONNECT("JIC_Web_Project",.T.)
SQLCONNECT(lnconn)
CRApplication = createobject("CrystalRuntime.Application")
CRReport = createobject("CrystalRuntime.Report")
CRReport = CRApplication.OpenReport("report_name",1)
ocParm = CRReport.ParameterFields()
oParm = ocParm.Item(1)
oParm.SetCurrentValue("IBM")
CRReport.PrintOut()
When running the report, I get to the print box (which I need to figure out how to turn off) but after selecting the print option, I get the following message: "ole idispatch exception code 0 from crystal reports active x designer: server has not yet been opened".
Thanks for any help.