just as a note, check for isnull first... not that it affects this, but as a rule.
something like
if {table.field} = x or isnull({table.field}) then
will never work. CR will 'silently' throw an error and ignore this code if {table.field} is null.
WHY? I believe that CR sees null = x (which makes no sense, and so errors out). But to be nice to us users, it ignores the error, but doesn't process the statement
but if we change the order to be
if isnull({table.field}) or {table.field} =x then
life is fine...
just a thought to remember for future reports