Database logged in on
Database logged in on
(OP)
I want to show on a report which database i am logged in ON rather than the database my crsytal was designed and connected TO
I did do a formula in SQL but that just picks up the design connection of the crsystal rather than showing which of 4 potential databases i maybe looged into (which all pickup the same crystal report)
Hope this make sense i am using CR16
I did do a formula in SQL but that just picks up the design connection of the crsystal rather than showing which of 4 potential databases i maybe looged into (which all pickup the same crystal report)
Hope this make sense i am using CR16
RE: Database logged in on
1. Have an extra table in the database that has the database name in it - it would have one column and one row. Include that table in the report (or in a subreport).
2. Depending on what type of database you're using, there may be a system function that will give you this information. If you're just linking tables together, you could then use a SQL Expression to call that function. If you're using a command, you would just add that as a column in your query.
MS SQL Server: "DB_NAME"
Oracle: "ora_database_name"
MySQL: "database()"
For other databases, google <database type> get current database name.
-Dell
Senior Manager, Data & Analytics
Protiviti
www.protiviti.com
RE: Database logged in on
RE: Database logged in on
-Dell
Senior Manager, Data & Analytics
Protiviti
www.protiviti.com