Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal

Status
Not open for further replies.

gregjohn

Technical User
Aug 13, 2001
29
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top