How to set up an SSRS report with check box

I have a query that has an indicator field on each row. The value is either a zero or a one. I want to create one SSRS report that will have a parameter field key off this field. What I want to happen is that if the user does not check the box the report shows all records. If the user does check the box, the report only shows those records with a one for a value in that field. How can this best be set up in SSRS? This is SQL Server 2005 SP3.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I can't figure out a checkbox but can make a 2 value dropdown.

OK, in the Layout or data view go to Report\Report Parameters.

Create a new parameter of type boolean.
Available Values
Label="Only These Ones", Value=True
Label="All Records", Value=False


Then in the data view open the properties of the dataset and go to the Parameters tab.
Add a parameter such as @MyParam and use the dropdown to choose the report parameter on the right.

Then modify the query to add to the WHERE clause similar to below.
--sample query
SELECT col1, col2, col3
FROM MyTable
WHERE @MyParam = 0 OR col3 = 1

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rwheeler23Author Commented:
This got me going in the right direction. Thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.