0

I have a customer demand to create a check box as a parameter . when the checkbox is selected the data should show the value for that checkbox otherwise all data should be shown

For example if the table has a column where if a student is active then value is 1 in the column and inactive has 0. Now there will be a check box and if the check box is selected then the value for 1 will be shown in the table else all the values.

What approach can i follow thanks in advance

aman6496
  • 143
  • 2
  • 13
  • Which SSRS version are you using? – jarlh Nov 22 '16 at 09:58
  • Visual Studio 2015 – aman6496 Nov 22 '16 at 10:02
  • For example if the table has a column where if a student is active then value is 1 in the column and inactive has 0. Now there will be a check box and if the check box is selected then the value for 1 will be shown in the table else all the values. – aman6496 Nov 22 '16 at 10:13

1 Answers1

0

You can use a parameter of type BOOLEAN (TRUE or FALSE). If you label it as "Show active students?" then the TRUE/FALSE options make more sense to them.

Then on your filter you can use something like ..

=Fields!StudentActive.Value = iif(Parameters!ActiveStudents.Value = TRUE, 1, 0)

Depending on where you filter, of course. You can always pass that direct to the SQL in the dataset by using (pseudocode):

where Active = (@StudentActive)

and on the dataset, you can pass the value as Parameters on dataset

Alternatively, you can create a list parameter: Create the parameter like this: Parameter Creation and set the values using Available Values on the parameter: enter image description here Similar pseudocode applies for filtering in SQL:

where Active in (@StudentStatus)

This will allow multiple selections of status.

BishNaboB
  • 1,047
  • 1
  • 12
  • 25
  • 1
    Thank you BishNaboB, for sharing the answer. is it possible to have it as check boxes --- just asking. customers requirement – aman6496 Nov 22 '16 at 12:26