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

Stored Procedures and Crystal Reports?

Status
Not open for further replies.

TheWall

Instructor
Apr 3, 2000
6
0
0
AE
Is it possible to use a stored procedure (that creates a Global Temporary Table, populates it and at the end select all its content) as a data source for Crystal Reports?

I get an error stating that no rowset was returned when I try to add the SP as a record source in Crysal. Yet, it executes fine and displays the records in Query Analyzer.

Thanks for the help.
 
We are using version 8.5 of Crystal with SQL Server 2000, and stored procedures work just fine. Crystal even automatically creates a parameter field to prompt the user for any parameters necessary to run the Crystal report. It could be that your "no rowset returned" error is due to a permissions problem. Try running the report using the same authentication you use for Query Analyzer.

Good luck!
 
My suggestion would be to check the output from Query Analyser. Are you doing Updates/Inserts, if so Does Query Analyser come up with

... 1 Row Affected.

Followed by your recordset.

If so, Crystal reports thinks that this is the recordset you are returning.

Put

SET NOCOUNT ON in your SP so that counts are not returned.

Hope this helps,

Chris Dukes

 
Thanks guys, however, with regular stored procedures, I have no problems with Crystal. The error comes out when I use temporary tables within the stored procedure. Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top