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!

Display Connection String 1

Status
Not open for further replies.

fallsr

Programmer
May 5, 2003
16
US
Is there a way within CR to get the connection string for an Oracle database and display it on the report?
 
If you are having a front end for this report, you can pass that as a formula and display the formula in the Report...

Cheers,

Ravi
 
This would be a standard report connecting to an oracle database. This is done outside the application. Could you provide an example of your suggestion?

Thanks,
Bob
 
So you are using just the Crystal Reports directly and supply the Connection String at the run-time?

Cheers,

Ravi
 
No - the connection string for the database is identified or chosen when the report is developed. At runtime, the user (or the schedule) simply provides a password. What I am looking for is a function or formula that gets the database name (i.e., connection) for display purposes. I can create a formula that I can display this info with but it would be hard coded and if the database name changed the report would not know it.

Thanks,
Bob
 
Bob,

Here it is how:

Goto Insert -> Field Object -> SQL Expression Fields

Create a new SQL Expression Field, give a name and editor will be opened. In the functions box, there would be a tree called System, open it and you can see the functions:

suser_name => User ID
db_name => Database Name

There are many variables and you can easily form your Connection String in your desired format and can drag and drop onto your Report.

This works here and so should work there!!!

Cheers,

Ravi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top