# Database Discussions > Reporting Services >  ssrs parameters

## shanish

I have a doubt here,

I have a table consists of a column "Marks", from this marks column values I've to display Pass if the mark >=50, else Fail. and in my report I've a parameter "Parem", if I give parem value as 0 it should display only the Fails marks and if it is 1 it should display Pass only, if it is 2 both pass and fail marks should be displayed.For this am writing the query as

 SELECT MARKS,
    CASE WHEN MARKS >= 50 THEN 'PASS'
    ELSE 'FAIL'
    END AS STATUS
FROM TableName
WHERE (@Param = 1 AND MARKS >= 50)
OR (@Param = 0 AND MARKS < 50)
OR (@Param is null )

when I execute this query in my management studio am getting the expected results, the same query when I execute in my SSRS, it seperates the where conditions as

Where (@Param = 1) AND (Marks >= 50) OR
                         (@Param = 0) AND (Marks < 50) OR
                         (@Param IS NULL)

so if I give 0 it shows even the pass marks, how can I give the parameters here, can anyone help me out...thanks in advance

----------

