Share via

Using the SSRS REST API, how do you get values of a report parameter when ValidValuesQueryBased=true?

Fred Spataro 15 Reputation points
2023-02-10T19:29:06.34+00:00

Hello,

I have a report with two parameters. The second parameter is filtered based on the user selection of the first. All works well in the stock ReportViewer UI but we are building a web page for users without direct access to that UI. The request to /Reports({Id})/ParameterDefinitions returns both parameters and the list of values for the first but I can't find a way to get the second parameter list when the user has selected the first value.

{
"Name":"Range"
,"ParameterType":"String"
,"ParameterVisibility":"Visible"
,"ParameterState":"HasOutstandingDependencies"
,"ValidValues":[]
,"ValidValuesIsNull":true
,"Nullable":false
,"AllowBlank":false
,"MultiValue":false
,"Prompt":"Range"
,"PromptUser":true
,"QueryParameter":false
,"DefaultValuesQueryBased":false
,"ValidValuesQueryBased":true
,"Dependencies":["Township"]
,"DefaultValues":[]
,"DefaultValuesIsNull":true
,"ErrorMessage":null
}
SQL Server Reporting Services
SQL Server Reporting Services

A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.

{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-02-13T06:52:31.8466667+00:00

    Hi @Fred Spataro

    Sorry I don't know REST API very well. In the official documentation of SSRS, there are the following two documents about rest api, which provide some examples.

    Develop with the REST APIs for Reporting Services

    REST API samples >>

    Hope these can help you.

    Best regards,

    Aniya

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.