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

re: Add Stored Procedure to Report 1

Status
Not open for further replies.

Purvee

Programmer
Joined
Jan 8, 2002
Messages
8
Location
GB
How do you add a stored procedure to a report. I know how to add table and views but cannot see how to add stored procedures.

Thanks

Purvee
 
By default, Crystal doesn't show stored procs as a report source. Go into the Options dialog box and on one of the tabs (SQL tab, I think), find the "Allow Reporting On" choices and click the checkbox for stored procedures.
 
Balves-

Followup questions - if you do this, does CR automaticaly refresh the Stored Procedure when the CR is run, or does it just read the saved data? If it uses the saved data is there a way to a)Manually force it to refresh the SP or b)automatically schedule a SP from Info or Enterprise or 3rd party tools?

Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
When you pick a stored procedure as a data source, it executes the stored proc right now. Otherwise, it wouldn't know what fields are available to place on the report design.

Every time you refresh the report it will execute the stored procedure.
 
The other problem you will notice is that while the Stored Proc can be the source of data for your report, you can't add any more tables to your report.

ALL the data for your report must be in the Proc.

Likewise a report using existing tables, can't "Add" a stored proc to get some additional reports. The Stored Proc can't be joined to other stored proc, tables or views.

For that reason I prefer to use views in my report.
Editor and Publisher of Crystal Clear
 
I have a question about this -- I have modifed an existing field in my stored proc -- the field name is the same, but the length is larger -- I can't get Crystal to recognize the new lenght. (It had a length of 2, but now is 25) Anyway to get Crystal to "refresh" the data information?

Thanks!
tim P.
 
I should have mentioned that -- I did run the verify database. It wouldn't work. I ran Set Location and re-selected the procedure and that refreshed it. Although I had tried it before, I kept getting an error about the Oracle connection. And again, there was nothing wrong with the connection. Yet another fun thing about Crystal. I'm hating it more and more everyday....

Thanks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top