[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

How to set up an SSRS report with check box

Posted on 2010-03-31
2
Medium Priority
?
454 Views
Last Modified: 2012-05-09
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.
0
Comment
Question by:rwheeler23
2 Comments
 
LVL 10

Accepted Solution

by:
Bodestone earned 2000 total points
ID: 29321534
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

Default=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

0
 

Author Closing Comment

by:rwheeler23
ID: 31709658
This got me going in the right direction. Thanks.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question