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

Cant Get SQL Stored Procs to accept parameters

Status
Not open for further replies.

MaffewW

Technical User
Apr 9, 2002
438
GB
Pleease help for whats probably a fairly simple prob

I'm new to Crystal reports (8.5) and I'm trying to report on some stored procs on SQL Server 7. I have a stored proc with a 'between' dates parameter, but when I link to the database via ODBC and specify the dates using the report expert, I just get a blank report with no data at the end. Also in the database menu the 'stored procedure parameter' option is greyed out. The stored proc definately works, and when I edit it and remove the date paramters, I also get data in the report.

I really need to use the stored procs rather than recreate the reports in Crystal cos there's come SQL stuff in there which I wouldnt know how to do in Crystal

Grateful for any advise
 
MaffewW,
Dates are a little tricky with crystal and stored proc.
Try changing the date parameter in the stored procedure to the following varchar format 'dd-mmm-yyyy'
SQL7 will accept this and automatically convert it to a date. The reason that you might be having problems is that crystal date value only stores to the second, and SQL7 date value stores to the millisecond.
 
MeTheZayets

Cheers, converting the stored proc date parameter to a varchar in that format worked fine.

The 'Stored procedure parameters' option from the database menu is still greyed out, so I can now set the report up, but cant change the parameters, can anyone help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top