How can I avoid drop down menus for Report parameters?
Hi I am new to Reporting Services and the MSSQLSERVER platform, but have for a number of years been designing reports for end users using OracleBI Discoverer. (in the good old days I was familiar with my BI tool :-)) My question is this: My sales organization wishes to follow the activity of all our customers - but not all at the same time. Ín total we have around 2500 customers and having to choose one or more of these from a drop down menu doesn't strike as very user friendly. I have tried different approaches when creating the parameter, but everytime I get a drop down menu in my report. Is there a way for me to avoid this, so that our salespeople can just type in the relevant account numbers seperated by commas instead? thank you (I hope)- Jacob -
March 10th, 2011 1:06pm

Jacob, You get the drop down menu if you supply the range of values (either hard coded or from a query). If you don't specify a range of available values you should just see a textbox into which you can type your value(s). Depending on which version or ssrs you are using make sure your report parameters are set to non-queried (2005) or none (2008). RegardsSteve Flynn
Free Windows Admin Tool Kit Click here and download it now
March 10th, 2011 1:23pm

Yes, A little bit sql can do this for you.. First Create a function in the DB using SSMS, that takes CSV string as input and returns a table with the values specified in the string.. CREATE FUNCTION [dbo].[FN_MULTI_VALUE_PARAM] (@RepParameter nvarchar(4000) ,@Delimeter char(1)= ',') RETURNS @Values TABLE (Param nvarchar(4000)) AS BEGIN DECLARE @chrind INT DECLARE @Piece nvarchar(100) SELECT @chrind = 1 WHILE @chrind > 0 BEGIN SELECT @chrind = CHARINDEX(@Delimeter,@RepParameter) IF @chrind > 0 SELECT @Piece = LEFT(@RepParameter,@chrind - 1) ELSE SELECT @Piece = @RepParameter INSERT @Values(Param) VALUES(CAST(@Piece AS VARCHAR)) SELECT @RepParameter = RIGHT(@RepParameter,LEN(@RepParameter) - @chrind) IF LEN(@RepParameter) = 0 BREAK END RETURN END Then edit your dataset query as follows. SELECT Column1, Column2, Column3 FROM TableName WHERE ColumnName IN (SELECT REPLACE(Param, ' ', '') AS Expr1 FROM dbo.FN_MULTI_VALUE_PARAM(@ParameterName, ',') AS FN_MULTI_VALUE_PARAM_1) Now you can try typing-in the the parameter values separated by comma, make sure you set the multi-value property to false in parameter properties. Let me know if you need anything else. Thanks.SqlUser2011
March 10th, 2011 1:35pm

Hi I'll try your sugestion in the near future, and let you know how it works. - Jacob -
Free Windows Admin Tool Kit Click here and download it now
March 14th, 2011 9:18pm

Hi I'll try your sugestion in the near future, and let you know how it works. - Jacob -
March 14th, 2011 9:18pm

Hi Steve Thank you for your reply - I forgot to mention my version (2008) - sorry. Your info was very helpfull in clarifying a few things about the parameter settings. On the issue of multi valued parameters I'll try out SQLUser2011's solution. Regards.- Jacob -
Free Windows Admin Tool Kit Click here and download it now
March 14th, 2011 9:23pm

Hi Steve Thank you for your reply - I forgot to mention my version (2008) - sorry. Your info was very helpfull in clarifying a few things about the parameter settings. On the issue of multi valued parameters I'll try out SQLUser2011's solution. Regards.- Jacob -
March 14th, 2011 9:23pm

Hi It worked like a charm. Highly recomended if anyone with a similar problem. thanks.- Jacob -
Free Windows Admin Tool Kit Click here and download it now
May 18th, 2011 4:27am

You're welcome. Let me know if you need anything else. Thanks! -SqlUser2011SqlUser2011
May 18th, 2011 11:23am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics