Monday, February 13, 2012

Allow Blank in parm not working

I am using RS2005. I have a data driven parm that I have checked "allow blank" as a value. I cant allow null so that isnt checked. I have even entered a space in the area where you can provide a default value. When I preview the report ... this parameter has <Select a Value> in the combo box. All other parms are filled in with defaults so the report should run. I hit "View Report" and get an error message "Please select a value for the parameter 'ParameterX' " which is the parameter I have said could be blank. Of course if I drop down the list there isnt a blank value to select - and I dont see why I would want to add one and force a selection of spaces ... seems like something is wrong here. Please help if you can. I am hoping it is just something simple.

Hello,

So let me get this right you have a drop down in the report that you want to be able to display a blank value you and contain a black value at the same time ?

what you can do is add a few lines of code to the sproc or sql statement that produces the resaults for the drop down parameter .

~~~~~~~~~~~ sample code

select EmployeeName, 2 as sort_col

from empdb

union all

select ' ' as EmployeeName, 1 as sort_col

Order by sort_col

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This will work in TSQL and there is a work around for oracle and teradata

|||

Thanks Charles,

I am using RS2005. The parm is a drop down list box. My question is why does my user have to select *anything* for that parameter if they want to leave it blank? Why do I have to insert a join to my query to add in a blank value which appears as a line of spaces in the drop down list. If the list is left untouched, and I have provided a default value of spaces (when I set up the parameter I gave it a default of spaces) - then why would it not work? It shows <Select a Value> text in the window of the list and forces you to make a selection ... if you want to leave it blank ... that is not an option. What is the purpose of having a check box "allow blanks" when you set up the parameter if there isnt any way to exercise the option of leaving it blank? I dont want to make my user *select* a blank line ... they should just be able to bypass that parameter if they dont want to make a selection.

|||

The allow blank works for input parameters. in order for blanks to be aloud in a drop down the sproc behind it must supplied the blank value

|||it seems very strange to me that I have to make them *choose* a blank ... since the idea is to minimize keystrokes by supplying a default value. Thanks for the reply :-)

No comments:

Post a Comment