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

Help with a formula 1

Status
Not open for further replies.

scottd431

IS-IT--Management
Apr 18, 2002
46
US
I am trying to get this formula to work and can only get it to give me a TRUE or FALSE. I have tried many diferent ways on this formula. I have a field PRODFIN.WEAVING that can have a number range between 910000-919999 and if it is equal to this number range I need it to make ODB_Mach.Mach_id (which is my group field) and when the PRODFIN.WEAVING is in this range this Mach_id is blank. Now if PRODFIN.WEAVING is not in the number range I need the Mach_id to remain its current value. Can anyone help with this scenario?

Ex so far this will only give me TRUE FALSE but I needt it to make the mach_id = to the value and if not in these ranges then = to its current value..

if {PRODFIN.WEAVING} = 910000 to 919999 then {ODB_Mach.Mach_id}= 910 else
if {PRODFIN.WEAVING} = 930000 to 939999 then {ODB_Mach.Mach_id}= 930 else
if {PRODFIN.WEAVING} = 920000 to 929999 then {ODB_Mach.Mach_id}= 920
 
Isn't {ODB_Mach.Mach_id} a database field? What are you trying to do change the value of that field in your database? Crystal cannot do this.

{ODB_Mach.Mach_id} = 910 will always evaluate to true or false be cause the value of {ODB_Mach.Mach_id} either IS, or IS NOT, equal to 910.


Please tell us what you are trying to accomplish and lets see if we can help.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
It should be possible to creat a formula field that will equal the ODB_Mach.Mach_id or one of the 3 other criterias set. Yes it is a field, this was one example of many I have tried. I appreciate you trying to assist me in this problem. I need a field to = ODB_Mach.Mach_id unless it falls in the criteria that is given and then I will need it to equal 910, 920 or 930 otherwise it will equal the actual mach_id #. Do you think this is possible?
 
You need a formula such as:

if {PRODFIN.WEAVING} = 910000 to 919999 then 910 else
if {PRODFIN.WEAVING} = 930000 to 939999 then 930 else
if {PRODFIN.WEAVING} = 920000 to 929999 then 920 else
{ODB_Mach.Mach_id}

Steve Phillips, Crystal Consultant
 
Thank you, I had tried something similar but I was just trying to do too much in my version. Forgot to use the K.I.S.S. method LOL Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top