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

Adding Actual Database Name to report & Helpful Books

Status
Not open for further replies.

Ericthemapper

Technical User
Feb 18, 2003
7
IN
I am trying to add the actual database name to my report. I am using Crystal Reports 9.0. I cannot find any help regarding this. Can anyone offer any help?

Also can anyone offer any suggestions for good Crystal Reports Books, Magazines, Online Magazines, etc for a newbie.

Thanks
 
using SQL I usually just add DBName = DB_Name() in my select stmt or stored proc.
 
You could also use cj's suggesion in a SQL Expression field.

-dave
 
When you talk about SQL Expressions. Are you referring to the SQL Expression Field under Field Explorer?

So I need to create a SQL Expression and type in

DBName = DB_Name()

in the window???


Also I have two subreports that are a part of my report and would like to do the same. Is it possible.

 
Yep, that'll work. You can drop the "DBName =" part if you want to, but it tests OK for me.

And yes, you should be able to do the same with your subreports.

-dave
 
I tried it just now and got the following error message

Error in compiling SQL Expression:

Not Supported

....Description: Undefined function 'DB_Name' in expression


 
What kind of database are you using?

-dave
 
DBF files. But I am not using a full version. I am using Crystal Report for ArcGIS (GIS meaning Geographical Information Systems). I think this might be my problem. Checking with my Tech Support group to see if this will work with my version.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top