locked
Report Filter RRS feed

  • Question

  • Hello,

    I would like to add a table to my report which will show only the projects with the report status of 'draft' and 'submitted'.

    I am creating this report in visual studio 2008 (which is where the difficulty starts :p)

    I am able to add a filter to my dataset or table, but I only succeed by adding one of the 2... So I can filter on the field projectstatus ="draft" and projectstatus ="submitted"...seperately... but I want them at the same time... so I see al the records that are "draft" or "submitted" only.

    However I don't know how to do this expression and VS 2008 confuses me... I tried an "and" statement but it didn't work...

    So in the "filter box" I have this filled in now:

    Expression: =Fields!new_statusname.Value
    Operator: =
    Value: ="draft"


    So that works for to filter and only see all the "drafts"... how can I get all the "submitted" records too?
    Monday, August 3, 2009 3:21 PM

Answers

All replies

  • you should be trying an 'OR' instead of an "and"-

    Alternatively, you can add the filter to the SQL query, if that helps.
    Scott Sewell, CustomerEffective | http:\\blog.CustomerEffective.com | Twitter:@ScottSewell
    Monday, August 3, 2009 4:38 PM
    Moderator
  • Ok problem solved... the "or" statement didn't work for some reason on the table... I don't know why.
    So I added a filter on the SQL query like you proposed.

    Thx.

    This is the filter in case anyone needs it:

    WHERE     (FilteredNew_project.new_statusname = N'draft') OR
                          (FilteredNew_project.new_statusname = N'submitted')
    Tuesday, August 4, 2009 8:33 AM
  • Hi,

    Just wanted to ask, did u try adding the filters in your dataset's filter tab in this manner !

    Expression                                                    Operator                        Value                And/Or

    =Fields!new_statusname.Value                                =                               draft                    or  
    =Fields!new_statusname.Value                                =                               submitted             


    Thanks and Regards,
    Nishant Rana
    http://nishantrana.wordpress.com
    Tuesday, August 4, 2009 8:55 AM
  • Well in VS 2008 where do you put the "or"?

    Because you can just "add" another filter but there is no option to put the "and" or "or"...

    Thats why I did it in the query.
    Tuesday, August 4, 2009 9:10 AM