Hello everyone,
I'm using Crystal Reports 2008, and I've come across a situation that requires that I display the connection info on the report itself.
I've done a lot of reading, and I think that it's impossible, but I figured that it couldn't hurt to ask.
The source of the data for the reports are a number of old Firebird databases. Each database has the same schema, so we are able to build the report once, then just run it against each database individually by changing the data source one by one. The problem is that it's imparative that we know which database the information for a given report came from.
Two solutions that I've found online to similar issues are:
- Use an SQL Expression Field to return {fn database()}
- Use an SQL Expression Field with something like "Select DB_NAME()"
The first solution fails with an error from the ODBC Firebird driver for an invalid token.
The second one isn't possible, as the database name isn't stored in any Firebird System Table, and there is no SQL code that will be able return the database name.
Currently, I've added a parameter field that requests the user to type in the name of the connected database, but this really pains me to do; it's prone to human error, data inconsistancies, and it's an extra step added to a number of reports that ares going to be ran several times every day.
Is there any way to display the connection string, Datasource Name, etc. without having the user enter it manually? I would really appreciate any possible solutions, as this is going to continue to be a major part of our daily activities...
Thanks for any help that you might be able to offer...
- Scott