I have a report with default parameters set as ' ' i.e a blank value through a query.
when i deploy this report RS2005 adds a <select a value> as the text listed in the dropdown beacuase of which it does not take my default value and no display of report.
How can I remove this text being shown.
Thanks,
Kiran.
Do you have the "allow blank value" property set? Also, is your query set up to return rows if the parameter is nothing?
Simone
|||Yes the parameter has allow blank value set. and it returns a different table with values if this parameter is kept blank.
Hence i want users to selcet blank if they do not want to consider this parameter and not just leave the parameter value as
<select a value>
Thanks,
Help appreciated.
Kiran
|||It seems that if you have a list of available values you must also set a default value. I have a case where I allow no value to be selected but have a list of available values when necessary. To handle this I add an "All" option to my available values list and set this as the default. If this is the chosen value, then I return all records. If another value is filtered the recordset is chosen based on the selection.
Simone
|||Hello,
So what i should do is if I ahve a list of values and a default value set to the parameter I remove teh allow blank value and that would remove the select a value.
would taht be correct?
thanks
|||Hello,
I have defqault value for the parameter from the list of available values.
Also i have unchecked the allow blank and allow null text boxes. Still tehre is the <select a value> in the parameter drop-down.
What next.
Thanks
|||In your query that selects the data, do you have anything such as this:
where column = case when @.variable = '' then column else @.variable end
This tells the query to pull all data when the variable value is blank, otherwise pull only the data matching the variable value. You then need to ensure you have '' as a valid choice in the "available values" section.
Simone
|||Thanks Simone,
I do have conditions like AND @.Country=' ' AND @.Srv_Level=' '
but there is a value in the dropdown that is ' ' which is also set as default value for some of teh parameters.
the difference is that selecting ' ' does not mean that select all values as in the dropdown there is an all functionality too. Selecting a ' ' matches a specific case and gives values returning to that condition.
I am thinking this is a RS2005 addition as in the designer view do not see the <select a value> in teh parameter dropdowns
Thanks
|||Maybe this will help you:
http://msdn2.microsoft.com/en-us/library/aa337234.aspx
I misunderstood your intentions with the blank value. The same should be true with having the blank value as your default. If it is a valid selection in the list and selected as your default value, so long as all other parameters also have a default value, your report should run. I am using both "ALL" and "" as defaults and do not have the <select a value> in my lists. I have either the "" or "All". Good luck.
Simone
|||I have used 'ALL' and NULL to accomplish this task on reports I have written|||Hi,Could you elaborate how using Null u manged to remove <select a value> I need a ' ' as a possible selection....
thanks
|||
I am using a SQL statement to return my list of available values. In the statement I add a UNION to include the '' default.
ex.
Code Snippet
Select FieldA
From TableA
UNION
Select '' as FieldA
Order by 1
I then set '' as the default value.
I hope this helps.
Simone
No comments:
Post a Comment