Hello all, and thanks for all help provided!
I have a Crystal Pro 9 problem with an Oracle database, which I am connecting to using the native Oracle drivers.
In one table there are four boolean fields that I am working with. I want to highlight the record if any one or more of the four fields are yes.
Here is the formula that I have written
If {field 1} = "Y" (this database uses Y/N for booleans)
then "X"
Else If {field 2} = "Y"
then "X"
Else If {field 3} = "Y"
then "X"
Else If {field 4} = "Y"
then "X"
Else ""
I am placing the formula in large bold type at the beginning of the detail line, and for those that have any one of the 4 fields as a yes, it should show up as an X to highlight the record.
However, the behavior is not what I expected. If the {field 1} is yes then it shows the X however if {field 1} is not yes but any of the other fields are yes, it shows a blank. It appears to evaluate the first if and then stop. I have tried switching the order of the fields and it does it the same regardless of which field is first. Always shows the X if the first field in the formula is yes but never if the first is no even if at least one of the other is yes.
If I write this as four seperate formulas it works just fine for each one.
My current solution is to use the four seperate formulas and to "stack" them so that any of the ones that are yes just show overlayed X characters, however ultimately, I would like to figure out why this is not working as it should and fix it so it is done in one formula rather than having four to maintain.
Thanks for reading all this and thanks for all help.
I have a Crystal Pro 9 problem with an Oracle database, which I am connecting to using the native Oracle drivers.
In one table there are four boolean fields that I am working with. I want to highlight the record if any one or more of the four fields are yes.
Here is the formula that I have written
If {field 1} = "Y" (this database uses Y/N for booleans)
then "X"
Else If {field 2} = "Y"
then "X"
Else If {field 3} = "Y"
then "X"
Else If {field 4} = "Y"
then "X"
Else ""
I am placing the formula in large bold type at the beginning of the detail line, and for those that have any one of the 4 fields as a yes, it should show up as an X to highlight the record.
However, the behavior is not what I expected. If the {field 1} is yes then it shows the X however if {field 1} is not yes but any of the other fields are yes, it shows a blank. It appears to evaluate the first if and then stop. I have tried switching the order of the fields and it does it the same regardless of which field is first. Always shows the X if the first field in the formula is yes but never if the first is no even if at least one of the other is yes.
If I write this as four seperate formulas it works just fine for each one.
My current solution is to use the four seperate formulas and to "stack" them so that any of the ones that are yes just show overlayed X characters, however ultimately, I would like to figure out why this is not working as it should and fix it so it is done in one formula rather than having four to maintain.
Thanks for reading all this and thanks for all help.