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!

How do you run a stored procedure in Crystal Reports

Status
Not open for further replies.

rydexdba

Programmer
Jul 23, 2001
7
US
I'm trying to run a MSSQL7 stored procedure just before a report is opened. Can anybody offer a solution on how this can be accomplished? Ideally, the user would open the report, the stored procedure would run and the data would then be reported. Can Crystal Reports do this out-of-the box? Any help will be greatly appreciated. Thanks.
 
You can base a report off a stored procedure. Just select the sproc where you would normally select a table. You might have to set an option somewhere if it only lists tables by default.
 
The option for including stored procedures within your report is included under the file menu, in options on the database tab.

Just click to include store procedures and then you will be able to add procedures as JerryCurl suggests.
 
Hi,
This is just additional information to above two replies.
Make sure your stored procedure ends with :
Select [field list] From ...
Then you should work with your SP as if you did with tables/views.

Krist
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top