Displaying Multi-select Parameters

Posted by: jonathan.brower on 3 March 2023, 6:13 am EST

    • Post Options:
    • Link

    Posted 3 March 2023, 6:13 am EST

    For a single select parameter, I can display the value chosen on the actual report by using Parameters!Param.Value. When I do this with a multi-select parameter, it just prints out System.Object. Is there a way to print all selections in a comma separated string?

  • Posted 5 March 2023, 5:41 pm EST

    Hi Jonathan,

    The Multivalue parameter stores the parameter values as an Object Array therefore displaying the same on the report displays ‘System.Object’.

    In order to display the selections in a comma-separated string you can write your own method in the ‘Script’ section of your report which takes a ‘System.Object’ type of parameter, converts and concatenates each string with a comma, and returns the resultant string. After which you can call this method from your report using ‘=Code.YourMethod(@ReportParameter1)’ and it will display all your selected values in a comma-separated string.

    Please find attached a sample implementing the same.

    Regards,

    Anand

    RdlReport1.zip

  • Posted 6 March 2023, 3:39 am EST

    Perfect, thanks so much!

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels