Monday, March 12, 2012

How to add Optional Parameters for SQL Reporting Service 2005

Hi friends,

I am developing reports using SQL Server 2005 Reporting service

I want to pass optional parameters to Report using dropdown

I filled dataset using EmpId and EmpName. and assigned this dataset to

query the values.

I checked properties for Report Parameters of Allow Null, Allow Blank values

Even i checked this properties, it enforces me to Enter some value for dropdown while running or previewing the report

I don't want to enforce the user that value must be selected.

In short, How we can able to pass multiple parameters which are not mandatory.

Pls reply me ASAP

Any suggestion is appreciated

Thanks in Advance.

Regards

Suds

hmm.... if i set the parameter to be multivalue, there'll be error if i want to set it to Allow Null...

my solution is if user does not want to select any specific value, then they can use select all....

i don't know how to put select all as the default value... maybe someone can suggest this...

if you found out, pls share ya....

|||Add a default value of "All" and use this value with in your expressions/queries to allow for a catch all situation

eg: with in the sql where clause add the following:
and case @.empid = 'All' then table.emp_id else @.empid = table.emp_id

It is a little bit messy to write but I believe it gives you the most control over the report.

Sam Vella.|||

minority80 wrote:

i don't know how to put select all as the default value... maybe someone can suggest this...

Report -> Parameters
Select the parameter you want to add a default value to
Select the Non-Queried radio Button
Enter "All" without the quotes into the text box

Sam Vella

No comments:

Post a Comment