Depends on database this works for MS SQL.
In Crystal Reports, open the report based off a MS SQL Server database, on which you want to display the database name.
In the Field Explorer pane, right click on "SQL Expression Field", and select "New..."
Type a name for the SQL Expression Field, and click "OK"
In the SQL Expression Field window. create a select based on this query depending on set up use Servername or Machine name
SELECT SERVERPROPERTY('ServerName'), SERVERPROPERTY('MachineName'), DB_NAME()
Save and close the SQL Expression Field.
Add the SQL Expression Field on the report to display the database name.
Ian