Hi,
I use Crystal Reports 11. We pull data from individuals records and compare those values to a set group of compliant values. If the individual is not compliant we need the name to be highlighted (in our case crred and crbolditalic). The problem I am running into is that there are several criteria that must be met by each individual. Some cases require an isnull, others a date subtraction and others a straight comparison to a value. I found that if I rearranged all of the criteria in differing orders (i.e. isnull first then date subtraction and finally value comparison) I would yield the desired results.
This explanation leads me to my question. Is there an order of operations, so to speak, when utilizing criteria in a formula? When I used the formula in a different order the individual record was not highlighted. The following code works when the isnull values are listed first. If the isnull values are mixed it doesn't work. I would appreciate any suggestions.
Thanks!
if (
isnull({Command.ADATE})=true or
isnull({Command.LDATE})=true or
(isnull({Command.LASTA})=true) or
isnull({Command.LASTBSYS})=true or
(isnull({Command.TOB}) = false and isnull({Command.SMOKE}) = false) or
(isnull({Command.ANTIPL}) and {Command.AGE} > 40) or
({Command.ADATE} < DateAdd ("m", -6 , currentdate)) or
({Command.LASTA} >= 7.0) or
({Command.LDATE} < DateAdd ("m", -12 , currentdate)) or
({Command.LASTL} >= 100) or
({Command.LASTBPSYS} >= 130) or
({Command.LASTBDIA} >= 80)
) then crred
I use Crystal Reports 11. We pull data from individuals records and compare those values to a set group of compliant values. If the individual is not compliant we need the name to be highlighted (in our case crred and crbolditalic). The problem I am running into is that there are several criteria that must be met by each individual. Some cases require an isnull, others a date subtraction and others a straight comparison to a value. I found that if I rearranged all of the criteria in differing orders (i.e. isnull first then date subtraction and finally value comparison) I would yield the desired results.
This explanation leads me to my question. Is there an order of operations, so to speak, when utilizing criteria in a formula? When I used the formula in a different order the individual record was not highlighted. The following code works when the isnull values are listed first. If the isnull values are mixed it doesn't work. I would appreciate any suggestions.
Thanks!
if (
isnull({Command.ADATE})=true or
isnull({Command.LDATE})=true or
(isnull({Command.LASTA})=true) or
isnull({Command.LASTBSYS})=true or
(isnull({Command.TOB}) = false and isnull({Command.SMOKE}) = false) or
(isnull({Command.ANTIPL}) and {Command.AGE} > 40) or
({Command.ADATE} < DateAdd ("m", -6 , currentdate)) or
({Command.LASTA} >= 7.0) or
({Command.LDATE} < DateAdd ("m", -12 , currentdate)) or
({Command.LASTL} >= 100) or
({Command.LASTBPSYS} >= 130) or
({Command.LASTBDIA} >= 80)
) then crred