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

CR-XI (R2) : Using "Set Datasource Location" with COMMANDS 1

Status
Not open for further replies.

MJRBIM

MIS
May 30, 2003
1,579
CA
CR-XI (R2)
ORACLE 10g
________________

We are retiring one Oracle database - and bringing another one on-line. They each have different TNS names.

I have been asked to take a quick look at some of the RPTs against the new old database, and confirm they will run OK against the new database.

Most of these RPTs are based on the CR-XI "COMMAND" function. I experience an issue when I try to point the existing COMMAND to the new location using the "Set Datasource Location" function.

I can create new RPTs against the COMMAND the new database - so I know it is not a connectivity/SQL issue...but I can't update the old existing RPTs using the "Set Datasource Location" function in CR-XI to move the COMMAND.

I highlight the Table/Command in the upper "Current Data Source" section (which shows the OLD db name), and "Add Command" in the lower "Replace with:" section (under the NEW db name).

When I click on "Update", the "Add Command To Report" window opens and I enter my valid SQL (works OK on new RPTs).

Then I click OK...

...and NOTHING happens...

...No Error...

...No Change to the upper "Current Data Source" section...

NOTHING.

Anyone had this issue before...?

I can only assume I am missing a step somewhere, but not sure where.

Thanks in Advance for the Help!




 
Here's how I've been able to handle this - if your table structure is the same in both databases, it works as long as you're either not using the schema owner as part of the table names in the command OR the schema owner is the same between the two databases. This works for tables and for commands:

1. Open the report file in Crystal.
2. Refresh the data for the report.
3. When the screen comes up asking you to log in to the database, use the new TNS names alias instead of the old one.
4. Once you have data, save the report. It will automatically save with the new database name - no Set Data Source required!

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
That worked - THANKS..!

Functional solution....but waaaaaaaay UGLY...

Do we call it a bug, or an "un-documented feature" of CR-XI (R2)...?

I want to test this in CR-2008 - and if there isn't a prettier way to do this in the new release

If not, I will submit it as a "wish list" enhancemnet.
 
Hi,
In Crystal the COMMAND you create is independant of ( rather, it is ignorant of) the datasource being used..It is just raw SQL code that wil be sent to whatever datasource the report object is connected to - hence, saving the report with the new datasource is the only way I know of to change the target of the COMMAND code..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Actually, I can think of a way to do this on multiple reports using .NET code. The basic flow would be:

1. Load the report file into a ReportDocument object.
2. Get the DataSourceConnections for the report.
3. For each item in the DataSourceConnections, change the value in the ServerName property.
4. Save the report.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top