Skip to Content
0
Former Member
Nov 21, 2013 at 11:20 AM

Record Selection formula and Parentehsis

175 Views

In Crystal Report 2008 I use an "apparently correct" record selection formula with parenthesis like this:

({table1.field1} = 'value1' and {table1.field2} = 'value2') or ({table1.field1} = 'value3' and {table1.field2} = 'value4')


When I run the report it doesn´t show the expected result and if I select "show sql query" I can see the parenthesis has disappeared and due to priority from "and" over "or" the filter is not what I want.

I have tried a lot of parenthesis combinations, and the sql query always deletes it.


How can I solution this?


Thanks.