parameters list: Allow multiple values not working

  • I have a parameters (drop down list) containing all text values that I built by manually providing the values in Add Values (as opposed to from query). It contains about 10 values (Division).

    It works. This drop down works fine by listing all available values and allows you to select one and returns correct results. But, I also need a default Select All option, so that users can select more than one value at a time or all values, and that's where the problem begins.

    --->

    To activate the 'Select All' option I went to the parameter's General tab, checked 'Allow multiple values'

    After I do that, I can still bring up the Preview page, and then see the drop down list has the (Select All) check box. I can also see the checkbox next to each one of the Division values. However, when I click Select All or any one of the values independently or together I get 'Loading....' followed by error

    "An error has occurred during report processing. The processing of FilterExpression for the dataset 'PPCQuery' cannot be performed. Cannot compare data of types System.String and System.Object[]. Please check the data type returned by the FilterExpression."

    Can you tell me how to solve?

  • It sounds like you have cascading parameters and PPCQuery is a dataset that populates a parameter that is dependent on the value(s) in you are selecting in the Division parameter. You need to re-code the filter expression PPCQuery to handle a multi-select parameter. I'm guessing the expression is something like this:

    =Parameter!Division.Value

    and you need to account for the fact that the multi-select parameter's value is now an array so you need something like:

    =Parameter!Division.Value(1)

    I haven't worked with this is awhile but if you Bing\Google working with SSRS multvalue parameters you should find what you need to make it work.

  • i have only one drop down box.

  • actually, it's really weird it's using PPCQuery, because I supplied the values for the drop down by typing them in. The parameter values are not supplied by a query!

    The datatype for the Division values in the PPCQuery is nvarchar(255) and the datatype specified for this parameter is text. These should be compatible.

  • For others who may encounter this perplexing situation (which is unique because the drop down is NOT based on a query and neither does the main report query contain a WHERE clause),

    the solution is quite simple.

    Because you are selecting an array of values (in my case Divisions) from the drop down, SSRS assigns the system.Object type to the list of values.

    Now EVEN THOUGH you are not using a WHERE filter in the main report query, and there is really no place to put 'IN'....you must still apply the concept of IN to the dataset filters. For me this is not as intuitive as using slicers in Excel.

    This link http://www.mssqltips.com/sqlservertip/2866/sql-server-reporting-services-using-multivalue-parameters/ and in particular the section Using Filters with Multiple Value Parameters shows how to select IN in the Tablix properties dataset filters. '

    You must right click on the dataset to get to the Tablix properties. So, just by changing from '=' to 'IN' I was able to make the Select All work.

  • I was using a dataset returning multiple value and on my report filter I had set the operator to IN and the value to: =Parameters!ReportParameter1.Value()

    This worked for me

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply