I am trying to filter record in crystal report on the basis of three sql table column values like :-
(not isnull({Table.IN_DATE}) or {Table.flag}='Y' or {Table.BOOK_CODE}='06') AND {Table.GRPS} = "22"
now report should display records if table in_date is not null or flag=Y or book_code=06 and GRPS=22 but report considering only in_date filter,
for e.g. if in_date is null and flag = Y or book_code is 06 then report should display same record but it is displaying on records whose in_date is not null.
Pls tell me where i am doing wrong. i will be very thakful to you...
Your logic looks correct. I have no idea what your table looks like, but I would make sure that the data types are correct. (i.e. {Table.GRPS} is a number and not a string)
A good way to figure out what's going on is to test your select statement one filter at a time:
- First with {Table.GRPS} = "22"
- Then {Table.flag} = "Y"- ... and so on and so forth.
One last thing would be to change your single quotes (') to double quotes ("). I know that Crystal Reports automatically changes singles to doubles, but just to be safe, try it out.
None
0 Points
10 Posts
Multiple filter in Crystal Report's record selection forumla editor
Dec 17, 2016 07:10 AM|neellotus07|LINK
Hi All,
I am trying to filter record in crystal report on the basis of three sql table column values like :-
(not isnull({Table.IN_DATE}) or {Table.flag}='Y' or {Table.BOOK_CODE}='06') AND {Table.GRPS} = "22"
now report should display records if table in_date is not null or flag=Y or book_code=06 and GRPS=22 but report considering only in_date filter,
for e.g. if in_date is null and flag = Y or book_code is 06 then report should display same record but it is displaying on records whose in_date is not null.
Pls tell me where i am doing wrong. i will be very thakful to you...
None
0 Points
1 Post
Re: Multiple filter in Crystal Report's record selection forumla editor
Feb 10, 2017 12:21 AM|erikson650|LINK
Greetings,
Your logic looks correct. I have no idea what your table looks like, but I would make sure that the data types are correct. (i.e. {Table.GRPS} is a number and not a string)
A good way to figure out what's going on is to test your select statement one filter at a time:
- First with {Table.GRPS} = "22"
- Then {Table.flag} = "Y"- ... and so on and so forth.
One last thing would be to change your single quotes (') to double quotes ("). I know that Crystal Reports automatically changes singles to doubles, but just to be safe, try it out.