locked
SSRS ReportServer URL Access Multi Value Parameter Select All RRS feed

  • Question

  • User-663659649 posted

    Hi All,

    I am trying to develop an app which will run any number of SSRS reports in vb.net using the URL access functionality. I have a simple example working perfectly with regular single input parameters however I am struggling to see how to work with a multi value parameter. Obviously if I run the report from reportviewer then I have the dropdown option for 'Select All'. Is there an equivilent option via URL access?

    The only thing that I have managed to get to work is to parse multiple single values to the same parameter e.g.

    http://SSRSSERVER/ReportServer%2FOLDER%2fREPORTNAME&PMBusinessGroup=BG1&PMBusinessGroup=BG2&rs:Command=Render&rs:Command=ClearSession

    This returns the report where the PMBusinessGroup parameter is equal to BG1 or BG2 and ticks them in the dropdown however this would ignore BG3 or any other values as an example.

    I guess my questions are:

    1. Is there a 'Select All' option that I can add into the URL which allows all values to be returned for this parameter? 
    2. If option1 is a hard no, is there a way to interogate the parameter to work out the available parameter values in vb.net so that I can build the appropriate string in the URL? The values in this parameter are the result of a query based on other parameters which could vary the results/options in the multi value parameter.

    Really hoping there is a 'Select All' tbh.

    Many Thanks

    Simon

    Tuesday, November 10, 2020 2:16 PM

All replies

  • User475983607 posted

    This type of problem is solved in TSQL.

    WHERE (column = @param OR @param ="All")

    If @param equals "All" then (column = @param OR @param ="All") = true.

    Tuesday, November 10, 2020 4:11 PM
  • User-663659649 posted

    Hi,

    I understand how to update the report to allow me to send 'All' to a text parameter. That's not really what i'm looking for. I am looking to see if there is built in functionality for the 'Select All' of a multi value parameter. In that instance sending 'All' would just error saying that it isn't a valid selection.

    I don't have access to amend the reports to cater for this sadly so need to find a way around it from the application side.

    Tuesday, November 10, 2020 5:23 PM
  • User475983607 posted

    audio-fusion

    I understand how to update the report to allow me to send 'All' to a text parameter. That's not really what i'm looking for. I am looking to see if there is built in functionality for the 'Select All' of a multi value parameter. In that instance sending 'All' would just error saying that it isn't a valid selection.

    No there is no magical string.  You must adhere to the language constructs. 

    Anyway, I use the approach explained above in SSRS and it works great.   Keep in mind, I'm not recommending using the work "All".  The code sample was intended to illustrate how to take advantage of a logical OR to shortcut a filter.

    false OR false = false
    false OR true  = true
    true  OR false = true
    true  OR true  = true

    Tuesday, November 10, 2020 7:49 PM