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

Making a report DB independent

Status
Not open for further replies.

CRNew

Programmer
Jul 31, 2003
9
IN
Hi,

I have a report which is connecting to an informix database using a System DSN. When we create a report it keeps a reference to the name of the database specified through the DSN.
How can I make my report independent of this database name. So that if we deploy this report in the production environment we are not required to update the same within the report.
Assuming that on the production machine also we have created a System DSN with the same name as on the development machine.

Pls let me know if its possible.

Thanks
 
If you are using Crystal 8.5 or earlier this is easy to do. Go to Set Location in the Database menu. Select a table in the database window. At the bottom of the Set Location dialog box, you should see the name of the table you selected with the DSN qualifiers attached. Simply put your cursor into that window and delete the qualifies. Make sure you do not delete or change the table name. Repeat this process for all tables in your report. Click Done. Then save your report. You may have to do a "Save AS" and overwrite your report.

Another way to do this is to go to Show SQL Query in the Database menu. Take the qualifiers off each table name in the FROM section of the query. Click OK and save the report.

If you have Crystal 9, you can no longer change the SQL query, and the Set Location works differently. I have not used Crystal 9 with an Informix db, so I do not know how to remove table qualifiers in Crystal 9(or even if it is still necessary).

However, you can change the DSN by opening Set Datasource Location from the Database menu. The "locations" of the tables in your report are in the top window in the dialog box. You can locate the database in the new location in the bottom window. Highlight the old datasource in the top window and the new one in the bottom window and click Update.

Roz
 
Thanks Roz for the reply.

We are using Crystal report 8.5 with Crystal Enterprise 8.5

With the method you have suggested, it gives some syntax error message but then it works fine.

However, we are accessing this report as a Web Report. In the report url i am giving all the required parameters. When I made this report database independent it has started asking for the database logon credentials. What could be the reason for this ?

I dont want to pass the database user name and the password in the report url itself so that it does not prompt for the same. Becasue of the security issues in doing the same.

Pls suggest if am missing out on something.

Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top