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

How do I alter report header based on ODBC connection

Status
Not open for further replies.

Bullfrog1870

Technical User
Dec 26, 2005
15
US
I want to create a generic report and use it on multiple databases. I was hoping to look up the name of the ODBC connection and use a formula to lookup and display a user friendly name on the top of the report.

Example:
If ODBCName = 'dbPhoenix' then ReportHeader.Title = 'Phoenix Regional Sales' else
If ODBCName = 'dbToronto' then ReportHeader.Title = 'Toronto Regional Sales'

CR9/SQL2K/ODBC (upgrading to CRXI next week)

Thanks!
 
Is there not a company table or some database table that contains this information?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
I'm not sure I follow?

I could create a simple table to cross reference the names but how do I get CR to display the name of the database it's 'hitting'?



 
With SQL Server as the data source, you can create the following SQL Expression in Crystal:
Code:
{fn DATABASE()}

Cheers,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
If there is a table with company name or other idetifying data, just add the table to the report and drage the relevant database fields to the page header.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top