【问题标题】:How to Pass Parameters to a Power BI Report on Report Server from MVC Application at Runtime如何在运行时从 MVC 应用程序将参数传递给报表服务器上的 Power BI 报表
【发布时间】:2019-06-11 16:39:04
【问题描述】:

我使用具有参数 From Date、To Date、CategoryId、DepartmentId 的存储过程在 Power BI Desktop 中创建了一个 power bi 报表。我已将报表上传到 Power BI 报表服务器。现在我正在尝试使用“iframe”将报告嵌入到我的 MVC 应用程序中,但我不知道如何在运行时从应用程序传递参数来报告。

谁能帮帮我?

除了使用“iframe”将报告嵌入到我的 MVC 应用程序并传递参数之外,还有其他选择吗? ?

感谢和问候

【问题讨论】:

    标签: asp.net-mvc parameter-passing powerbi-desktop power-bi-report-server


    【解决方案1】:

    您必须在 URL 中传递过滤器,如下所示:

    https://yourserver/Reports/xxx?rs:Embed=true&filter=MyBaseTable/CategoryId eq 2 and MyBaseTable/DepartmentId eq 3 and MyBaseTable/DateField ge 2019-01-01 and MyBaseTable/DateField le 2019-01-31
    

    更多信息可以看Filter a report using query string parameters in the URL

    【讨论】:

    • 感谢您的回复。但我已经知道这种担忧。目前,我不知道表名和字段名。我只是尝试使用 rest API 从报告服务器获取报告详细信息,但我没有从中获取参数。有没有办法像我们在 SSRS 报告中设置的那样设置参数值(输入参数值的 UI)或从 API 获取参数?
    • 我不确定 Power BI 报表服务器。对于 Power BI 服务,您可以使用 Get ParametersGet Parameters In Group 获取有关参数的信息,并使用 Update ParametersUpdate Parameters In Group 更新它们的值。
    猜你喜欢
    • 2022-07-22
    • 1970-01-01
    • 1970-01-01
    • 2022-12-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-30
    • 1970-01-01
    相关资源
    最近更新 更多