Multi-value parameter show all by default

  • I am sure this is easy, but I cannot find the option. I have a singe, multi-value parameter on my report. When the report loads, it is blank with the parameter the user must select. They then click the view report button to view the report as specified by the parameter. I want the report to load, by default, with all values then give the user the ability to narrow the focus of the report by selecting the value(s) in the parameter. How can this be done?

  • Hi there,

    It's been a year since I did this, so I don't remember the exact steps, but you can set up the multi-value checkbox to set the default items to be checked off of a dataset. Just use the same dataset that you use for populating it, and all items will be selected.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • I have tried everything, but cannot get this to work!

  • As Wayne said, populate the default values from query (using the same dataset that you used to populate the Available values) and values field same as the Available values - value field. This should work providing you are using a query to populate the dropdown.

    If not, then you can just give a comma separated value list as non query

  • I don't know what I am doing wrong. I have the following:

    Available Values

    - From Query

    - Dataset = Dataset1

    - Value Field = EventName

    - Label Field = EventName

    Default Values

    - From Query

    - Dataset = Dataset1

    - Value Field = EventName

    Anything seem wrong here?

  • That's weird. Does this happen when you preview the report or when you deploy the report?

  • Both preview and deploy.

  • I once had such issue when I was using multiple multi valued paramaters. I restarted Visual Studio and then recrerated the report (copy paste the report, create dataset, refresh fields and then add parameters). In my case, it seems the order of dataset creation mattered with multiple datasets. And it worked.

    I would suggest you to restart visual studio, then recreate the report. It won't take more than 10 mins to try it. I know it sounds silly but there is no harm in trying. Also delete the report having issue from the server where it is deployed and redeploy the report. Also, I understand that you have only one multi valued parameter. Do you have any other parameters?

    Let me know if it works.

  • Just one parameter.

  • I would suggest you to first try recreating the report as a new one.

    Also, what I understand is that the values are being populated in the dropdown and just not being selected. Just to make sure that the dataset is returning values.

  • I rebuilt and still no go. I don't get it.

  • Dataset is returning values. I recreated the report from scratch, minus my formatting, and added the parameter. It still does not work. I am at a loss.

  • Can you insert the sscreenshot of report parameters properties?

  • Check your dataset for null values. If it contains a null value for anchor event, but your report parameter is set to not allow nulls, RS will revert to not selecting any values by default.

    Hope this helps.

Viewing 15 posts - 1 through 15 (of 18 total)

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