SQL Server Performance

How to use multi-value parameter in SQLReports2005

Discussion in 'SQL Server 2005 Reporting Services' started by sqlserverreports, Nov 13, 2006.

  1. sqlserverreports New Member


    I am using ASP.net 2.0......my requirement is' to populate data in combo box in 'Report viewer control tool bar',then based on filter condition data is displayed in rdlc file...To populate combo box trying to use multi-value parameters....but i don't know how to use multi-value parameters... send me the navigation steps to achieve result...

    Thanks in advance...
  2. techieman New Member

    For using multi-value parameter, make following changes:<br /><br />1) Make multivalue property true for that parameter<br /> &lt;MultiValue&gt;true&lt;/MultiValue&gt;<br />Place this tag before end tag of that report parameter<br /><br />2) Make change in input parameter for the query for that parameter<br /> Suppose if your input parameter name is ABC then make following change in the query parameter<br /> &lt;QueryParameter Name="@ABC"&gt;<br /> &lt;Value&gt;=Join(Parameters!ABC.Value, ",")&lt;/Value&gt;<br /> &lt;/QueryParameter&gt;<br /><br />3) Make change in query<br /> Instead of using "=" for comparision use "IN"<br /> EG: Instead of "ABC = @ABC", modify as "ABC IN @ABC"<br /><br />Above change will add checkbox to your dropdown of parameter to make it multiselect. It will add "Select All" option. <br />If by default you want to get all the values select during the loading of report then in default value give the dataset name and field name<br /><br /><br /> &lt;DefaultValue&gt;<br /> &lt;DataSetReference&gt;<br /> &lt;DataSetName&gt<img src='/community/emoticons/emotion-4.gif' alt=';P' />rogramId&lt;/DataSetName&gt;<br /> &lt;ValueField&gt;CodeID&lt;/ValueField&gt;<br /> &lt;/DataSetReference&gt;<br /> &lt;/DefaultValue&gt;<br /><br />I hope above info will suffice for making the multiselect change....
  3. Eisen New Member

    Also keep in mind that in SP1 the automatic "select all" parameter was removed. However, in SP2 it is back. <br /><br />Dont ask me why though <img src='/community/emoticons/emotion-1.gif' alt=':)' /><br /><br />See here:<br /><a href='"http://download.microsoft.com/download/2/B/5/2B5E5D37-9B17-423D-BC8F-B11ECD4195B4/WhatsNewSQL2005SP2.htm"' target='_blank' title='"http://download.microsoft.com/download/2/B/5/2B5E5D37-9B17-423D-BC8F-B11ECD4195B4/WhatsNewSQL2005SP2.htm"'>SQL Server 2005 SP2 Features</a><br /><br />Thanks,<br />Eisen

Share This Page