I am passing a selection formula from my ASP.NET app to Crystal
Reports.
I've recently added some code that needed to be passed to the report
with a SQL "IN" clause.
I have added the proper parenthesis, but it looks to me like Crystal
is ignoring them. Some of the results rows that should be returned are
not.
When I add the same criteria to the stored procedure that the report
is based off of, it brings back the results I want.
Is there a way to get the logic I want?
Here is how it looks getting passed to Crystal:
( ( {sp;1.TEXTFIELD1} = 'AA' AND {sp;1.INDICATOR} = 'Y' AND
{sp;1.ID_NUMBER} = 99 )
OR
({sp;1.CHL_CD} IN ['ABCD'] AND {sp;1.INDICATOR} = 'Y') )
So, any rows that meet any of the criteria on either side of the "Or"
should come back. Certain rows are omitted, seemingly because it's
ignoring the parenthesis.
Here is the WHERE statement from SQL, which works properly:
(TEXTFIELD1 = 'AA' and INDICATOR = 'Y' and ID_NUMBER = 99)
OR
( CHL_CD IN ('ABCD') and INDICATOR = 'Y')
Any ideas?