SSRS REST API服务,获取QueryBased参数的值

时间:2018-09-06 09:31:34

标签: sql-server rest reporting-services ssrs-2017

我正在使用新的SQL Server 2017 Reporting Services REST API。 我已经可以加载报告+参数了!

当我加载参数定义时,来自服务器的答案如下:

{
"@odata.context": "http://localhost:8080/reports/api/v2.0/$metadata#ParameterDefinitions",
"value": [
    {
        "Name": "Sorting",
        "ParameterType": "Integer",
        "ParameterVisibility": "Visible",
        "ParameterState": "HasValidValue",
        "ValidValues": [
            {
                "Label": "ArticleNr",
                "Value": "0"
            },
            {
                "Label": "ArticleName",
                "Value": "1"
            },
            {
                "Label": "GroupNr",
                "Value": "2"
            },
            {
                "Label": "Price",
                "Value": "3"
            }
        ],
        "ValidValuesIsNull": false,
        "Nullable": false,
        "AllowBlank": false,
        "MultiValue": false,
        "Prompt": "Sorting",
        "PromptUser": true,
        "QueryParameter": true,
        "DefaultValuesQueryBased": false,
        "ValidValuesQueryBased": false,
        "Dependencies": [],
        "DefaultValues": [
            "0"
        ],
        "DefaultValuesIsNull": false,
        "ErrorMessage": null
    },
    {
        "Name": "Group",
        "ParameterType": "Integer",
        "ParameterVisibility": "Visible",
        "ParameterState": "HasOutstandingDependencies",
        "ValidValues": [],
        "ValidValuesIsNull": true,
        "Nullable": true,
        "AllowBlank": false,
        "MultiValue": false,
        "Prompt": "Group",
        "PromptUser": true,
        "QueryParameter": true,
        "DefaultValuesQueryBased": false,
        "ValidValuesQueryBased": true,
        "Dependencies": [
            "Password",
            "Username"
        ],
        "DefaultValues": [
            "0"
        ],
        "DefaultValuesIsNull": false,
        "ErrorMessage": null
    }
]}

如果您很容易查看参数“排序”,则可以使用有效值。 (因此,值在报告中定义) 当您查看参数“ Group”时,没有“ ValidValues”,因为ValidValues是QueryBased,这就是我的问题。

我如何获取基于QueryBase的参数的值,是否有机会?

我阅读了这个doku:https://app.swaggerhub.com/apis/microsoft-rs/SSRS/2.0#,但找不到解决方案。

0 个答案:

没有答案