Multiple filter in Crystal Report's record selection forumla editor RRS feed

  • Question

  • User-737190177 posted

    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...

    Saturday, December 17, 2016 7:10 AM

All replies

  • User-680340831 posted


    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.

    Friday, February 10, 2017 12:21 AM