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

Displaying names other than database field names at runtime 1

Status
Not open for further replies.

SmokeEater

Technical User
Feb 14, 2002
90
CA
Is there a way to substitute real world names for cryptic database field names when a compiled report is run?
 
The easiest thing to do is just modify the cryptic text fields that crystal places on the report as the report is being built. I do this on nearly every report I write. Then recompile the report. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
The problem is not in the design of the form but in the record selection area. Crystal uses the cryptic database field names when it requestes information,to satisfy the record selection formula, from the user.
ie. crystal will ask for information of the user to fill a field called {OF_GLEXPORT.ACCOUNTINGDATE}. I want to ask the user for the Date: .
 
If the user is modifyinh selection criteria at runtime, which is what I believe you are talking about, the user will see these cryptic names. To get around this, you could create a crystal dictionary to make alias names for the cryptic named fields thus translating them into something more user friendly. Then write your report against the dictionary.

I have never tried this but I am pretty sure it will work. Please advise if you end up doing this. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Thanks, that was the way I thought I might have to go. I was however hoping I could avoid it.
 
You could also create formulas in the report that are simply a single field, one for each field used in selection. Then use the formula fields in the selection formula instead of the database fields. This might affect performance, but it is worth a shot. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Thanks for the suggestion. I tried it quickly and it looks promising. At the very least I have gotten rid of those cryptic field names. I will have to give the idea a thorough test.
 
Check to see if it slows down data retrieval. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
The soloution to my problem was to use parameter fields. They offer many pluses in that besides being able to get around the cryptic database name issue you can also create drop down selection lists. The drop down list can be discrete values, range of values or both.

There does not appear to be any hit on performance.
 
I guess we all assumed that you had to use the older technique for some reason. Parameters are a much better approach. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top