arkiboys2


In the report I created, there is a drop down used as a parameter, i.e. Sector.
This drop down gets populated with data. It also has <Select a Value> in there.
When no item is selected, i.e. only <Select a Value> is shown in the drop down list, when the view Report button is clicked, the message says:
Please select a value for the parameter 'Sector'
The view Report used a stored procedure which allows null for this Sector parameter.
The SP does work fine in the sql server query analyser because it returns data with and without the sector parameter.
Any thoughts please
Thanks




Re: null parameter

Simone


Did you check off the property to "Allow null value" on the parameter. This may help you.






Re: null parameter

arkiboys2

If I uncheck that then I will have to select an item from the list.

I would like to have the option to NOT select an item from the list so that when View Report is clicked then all data is returned.

Thanks






Re: null parameter

John Vulner - MSFT

If a parameter is Nullable, meaning "Allow null value" is checked, RS will not prohibit the parameter from having a value of NULL. However, if the parameter has a valid values list, NULL must also appear in that list. RS will not insert NULL as a valid value into the list you provide.

In your scenario, you will need to explicitly include NULL in the values returned by your parameter data set. If you are using the SQL data extension, one way of doing this is as follows:

Code Block
(select
[Label],
[Value]
from [ParameterValues])
union
(select
'None',
NULL)

Where [Label], [Value], and [ParameterValues] are your column and table names.