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

Changing a Field Name 1

Status
Not open for further replies.

mark929

Programmer
Nov 30, 2001
67
US
This seemed like a simple task, but nothing I try seems to work. I just need to have a certain DB field name change on the report. My latest unsucessful attempt is below. Any input would be greatly appreciated. I have a looming deadline.

if{EMPLOYEE_ORGANIZATION_TITLE}= "PROGRAMS OFFICE"then{EMPLOYEE_ORGANIZATION_TITLE}= "PROGRAMS DIVISION"

Thanks

Mark
 
You cannot change a field name, you can create formula field as follows:

If {Fieldname}="PROGRAMS OFFICE" then "PROGRAMS DIVISION" else {Fieldname}

Then place this formula field on your report. Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
As dgillz says, you can't change use a field name as a variable and I think what he says is what you are probably after. The other thing to bear in mind is that if you were trying to do your formula with a variable, it still wouldn't work and wouldn't even give an error message.

Crystal requires = in the comparitive part of an if statement but := if you are trying to assign a value. It is very easy to get caught out by this as:

IF numbervar varname = 5 then varname = 3

does not reset varname to 3 but just returns FALSE if varname = 5.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top