Wednesday, March 7, 2012

Creating Optional Parameter dropdown lists

I have a parameter that acted as optional before I changed it to a dropdown
populated by a query. Now the report forces me to select something in spite
of the fact that I have selected ALLOW BLANK and have tried to use blanks
spaces or other things as a default values. It seems like it won't recognize
a default value when the parameter is a dropdown.
Is this by design, is something acting in error, or am I doing something
wrong?You will need to also select "Allow Null" for the parameter and it should
then default to NULL and auto execute the report.
You may also need to pass in a NULL value from your data set that populates
the optional dropdown list. You can do this by using a UNION statment in the
dataset that will return the NULL value, such as:
select MyID, MyDescrtiption from MyTable
UNION
Select Null,Null
I hope this helps.
--
Rodney Landrum - Author, "Pro SQL Server Reporting Services" (Apress)
http://www.apress.com
"John Marsh" <John Marsh@.discussions.microsoft.com> wrote in message
news:6065AC4F-F402-450B-AFEA-A977CFE152AC@.microsoft.com...
>I have a parameter that acted as optional before I changed it to a dropdown
> populated by a query. Now the report forces me to select something in
> spite
> of the fact that I have selected ALLOW BLANK and have tried to use blanks
> spaces or other things as a default values. It seems like it won't
> recognize
> a default value when the parameter is a dropdown.
> Is this by design, is something acting in error, or am I doing something
> wrong?

No comments:

Post a Comment