×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Database logged in on

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

RE: Database logged in on

I can think of a couple of possible ways to do this:

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

(OP)
Thanks but its a vendor SQL application so I cant add tables. You would think from the splash screen login where you select which db to login you could pick that up but the vendor is not being helpful at all

RE: Database logged in on

If you know what the back-end database is for the application, you might still be able to use the second option that I described. Unfortunately, there is no way to do this natively in Crystal.

-Dell

Senior Manager, Data & Analytics
Protiviti
www.protiviti.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close