Monday, February 13, 2012

Add "(all)" to dataset

Hi list!
I have a set of report parameters and some are dropdowns (combo) from
datasets. In adition to the values in a dropdown I want the value "(all)" as
the first value in each dropdown. How do I do that?Hello -
You will need to first make sure your parameter will Allow NULL values in
the Rpeort Parameter properties. Next, in your dataset that drives the
parameter drop down list, UNION the 'ALL' with a NULL value, something like
this.
Select MyID, Description from MyTable
UNION
Select NULL, 'All'
In your Rpeort Properties, if you have MyID as the Value field and
Description as the Label field, 'All' will now be displayed in the dropdown
and when selected will pass the NULL value to the report and return all of
the data you expect. I had to something very similar in my projects, prior
to driving the dropdowns in custom forms with code.
--
Rodney Landrum - Author, "Pro SQL Server Reporting Services" (Apress)
http://www.apress.com
"J. Kando 411" <J. Kando 411@.discussions.microsoft.com> wrote in message
news:DA7D6DCC-F9AF-4C88-8276-70B9C968E187@.microsoft.com...
> Hi list!
> I have a set of report parameters and some are dropdowns (combo) from
> datasets. In adition to the values in a dropdown I want the value "(all)"
> as
> the first value in each dropdown. How do I do that?

No comments:

Post a Comment