Filtering records based on parameter values

  • Hi,

    I have a report with three parameters.The values for these parameters are passed dynamically.I have to filter the records based on the parameter values.

    I'm using filters at the dataset level.Among the three parameters one parameter will have "All" as value.So When the parameter value is "All" all the records from the database table should be displayed.I tried using

    =iif(Parameter!Filter.value="All","*","Parameter!Filter.value)

    Nothing works and it displays 0 records.

    Please help....

  • Hi All,

    I got the answer and it is

    =iif(Parameters!Filter.Value="All",Fields!status.Value,Parameters!Filter.Value)

    Hope it helps the newbie'zzzzz

  • Just to help the newbiezzzzz a bit further, this is an Access bit of code you're writing, not T-SQL inside SQL Server 2005, right?

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply