【发布时间】:2020-04-20 14:21:15
【问题描述】:
我正在尝试在我的 Angular 应用程序中的 Iframe 中显示带有过滤器的 PowerBi 报告。 我在没有过滤器的 iframe 中成功显示了嵌入 URL 下方。
<iframe src="https://msit.powerbi.com/reportEmbed?reportId=xxx&autoAuth=true&ctid=xx&config=xxx"></iframe>
这里我需要根据一些 RequestId 过滤报告,然后将其显示在 iframe 中。
过滤后的网址 https://msit.powerbi.com/groups/xxx/reports/xxx/ReportSectioncxxx?filter=RequestDetails/Numbereq 'xxxx'
当我在 iframe 中尝试此操作时出现以下错误:
拒绝在框架中显示“URL”,因为它将“X-Frame-Options”设置为“拒绝”。
如何将此过滤后的 URL 转换为嵌入 URL 以显示在 iframe 中。
【问题讨论】:
-
将
&ctid=ctid附加到查询字符串的末尾,使其看起来像https://msit.powerbi.com/groups/xxx/reports/xxx/ReportSectioncxxx?filter=RequestDetails/Number eq 'xxxx''&ctid=ctid。你可以在这里找到解释:Filter a report using query string parameters in the URL - Microsoft -
还是同样的错误。是否需要在 URL 中添加“reportEmbed”?没有过滤器的基本 URL 具有该文本。
标签: iframe powerbi angular7 powerbi-embedded power-bi-report-server