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!

Reports with Stored Procedures

Status
Not open for further replies.

AaronA

Programmer
Sep 27, 2000
21
US
I have asked this question before, but I dont think I got a straight answer. All I want to know is if it is possible to generate a report with a stored porcedure. I have tried to set a report's datasource to a recordset created by a stored porcedure and it doesn't work. It gives me an error that says "Can't access first record!" I'd just like a straight yes/no answer on this. Thank you for your time. [sig][/sig]
 
Which product are you using? Seagate Info or just Crystal report? I'm using Seagate Info and you can create a report with stored procedures. Not sure about just Crystal Report alone. But from what I've read about the software's documentation, the answer should be yes. Sorry, not sure if this helps. [sig][/sig]
 
I just got off the phone with Seagate, the reason why it DOESN'T work is the fact that Stored Procedures return -1 as a record count, but any recordset that uses a forward only cursortype will return -1 as a recordcount. I've never heard of a Stored Procedure that wasn't forward only. The guys at tech support told me I need to set the recordset to something else other than forward only (like Open Keyset or Open Dynamic). I don't think that is possible, however I am going to try it. I'll see if that works. Thanks for the help. [sig][/sig]
 
Not sure I understand what you mean by "generate a report with a stored porcedure", but if you mean can you design and run a report from the output of a stored procedure, the answer is yes. I have about 200 reports in production that run from the output of SQL stored procedures.

When I first design using the report expert I click SQL/ODBC and then select the ODBC I want to use. I set up the ODBC to various SQL databases and servers using the standard windows sitting - 32bit ODBC.

Doing this allows me to do all the serious work in SQL on the database server instead of putting this into crystal.

[sig][/sig]
 
Not sure I understand what you mean by "generate a report with a stored porcedure", but if you mean can you design and run a report from the output of a stored procedure, the answer is yes. I have about 200 reports in production that run from the output of SQL stored procedures.

When I first design using the report expert I click SQL/ODBC and then select the ODBC I want to use. I set up the ODBC to various SQL databases and servers using the standard windows sitting - 32bit ODBC.

Doing this allows me to do all the serious work in SQL on the database server instead of putting this into crystal.

Ken (speer@loma.org) [sig][/sig]
 
Thanks for the Input, I figured out what was going on. I wrote up a FAQ, for it called "Generating Reports With Stored Procdures" That should Explain it to anyone else who may have the same question. What happend was I have a connection object that the App uses and everything uses it to connect to the database, however its cursor location is Server Side, so I was relying On that, not knowing anything about the connection object, so I assumed I couldn't do it. Anyway, there is a FAQ that explains how it works if you want to look at it. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top