简体   繁体   English

在 Power BI Embedded 中以 PDF 格式导出报表

[英]report export in PDF format in Power BI Embedded

We are embedding power bi reports in a customer web application and I have a requirement where the report has single page and that report page needs to exported to PDF format on a button click(GENERATE REPORT).我们在客户 web 应用程序中嵌入了 power bi 报告,我有一个要求,即报告具有单页,并且该报告页面需要在单击按钮时导出为 PDF 格式(生成报告)。 is this something achievable from power bi or using power automate flow or any other way?这是否可以通过 power bi 或使用电源自动化流程或任何其他方式实现? below以下在此处输入图像描述

Assuming you have this button inside the report page, you can set an event handler for the event "buttonClicked".假设您在报告页面中有此按钮,您可以为事件“buttonClicked”设置事件处理程序。 You get all the event details as parameter in your event handler function.您可以在事件处理程序 function 中获取所有事件详细信息作为参数。 'buttonClicked' event handler docs 'buttonClicked' 事件处理程序文档

...
report.on("buttonClicked", (event) => {
  if (event.detail.id === "YOUR_BUTTON_ID") {
    // Add your logic to send a request to your backend to consume the Power BI REST APIs
  }
});

You can now consume the report export APIs.您现在可以使用报告导出 API。
Find the code example here此处查找代码示例
Note the limitation and considerations of exporting reports to PDF注意导出报告到 PDF 的限制和注意事项

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM