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!

Renaming a Stored Procedure

Status
Not open for further replies.

Crider

Programmer
Aug 4, 2003
13
US
I want to rename the stored procedure that is currently driving a given crystal report. When I change the report to use the renamed SP, it blows all my report fields away coming from the SP. The SP is identical to what the report uses now. It's just that the DBA would like me to rename the prefix of the SP's. How can I tell a Crystal Report that I am using a different stored procedure but it is exactly like the one being used, without having to layout out my report fields again?

Thank you
 
For Crystal 8.5, I'd try [Verify Database], which is under the [Database] menu

Madawc Williams
East Anglia, Great Britain
 
I am using Crystal 9 and did all that. But the problem is when I look at the Show SQL Query from the database menu item, it shows the original stored procedure name being called. I want to change the name there but Crystal won't let me. Any suggestions?
 
I solved my problem and am passing it along for anyone who faces the same situation in the future.

1. Rename the stored proc (I'm using SQL Server/2000)
2. Retrieve the report in Crystal (I am using CR 9)
3. From the Database menu, Set Datasource Location
4. Hilight the stored proc currently being used in the Current Data Source section
5. Hilight the stored proc you want to use in the Replace With secion.
6. Click the Update button.
7. When the process is finished, click Close.
8. From the Databse menu, Show SQL query. The stored procedure name will be changed.

You can then go to the Database Expert and rename the original stored procedure to what is being used now.

The problem I ran into is the report I was trying to change had a sub report in it as well. You have to change the main report plus any sub reports in order to see the change when you Show the SQL Query. I didn't, thus creating my problem.

Hope this helps anyone in the future.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top