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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble Passing values to stored procs in VB

Status
Not open for further replies.

DiggerDog

Programmer
Nov 24, 2002
60
AU

I use the following code to open the report
testreport.rpt
and connect to the DB using the odbc connection
CAL042 Clareports

THe RetrieveStoredProcParams methid returns a memory overflow error and when I exclude this and run the report
using the PrintReport method the report ignores my stored proc parameters and creates a report using the default parameters


CrystalReport1.ReportFileName = TestReport.rtp
CrystalReport1.Connect = "DSN = CAL042 Clareports;UID = user ;PWD = password ;DSQ = Clareports"

ParamCount = CrystalReport1.RetrieveStoredProcParams - this returns an out of memory error

CrystalReport1.StoredProcParam(0) = "W"
CrystalReport1.StoredProcParam(1) = "%"
CrystalReport1.StoredProcParam(2) = "%"
CrystalReport1.StoredProcParam(3) = "%"
CrystalReport1.StoredProcParam(4) = "%"
CrystalReport1.StoredProcParam(5) = "3rd Party%"
CrystalReport1.StoredProcParam(6) = "%"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top