进行更改后,将Power BI嵌入式报表保存到数据库中

问题描述

我正在使用power bi嵌入式软件包来嵌入power bi报告-https://github.com/microsoft/powerbi-client-react

报告嵌入在编辑模式下,因此用户可以创建或编辑报告。现在,我有了一个保存按钮,一旦用户对Power Bi报表进行了更改,我想将该报表保存在数据库中。您能告诉我如何触发报告事件吗?看来允许的保存事件不起作用。

此外,如果我必须在用户进行更改或创建报表后获取报表实例,如何才能再次获取报表实例以反映新更改?

<PowerBIEmbed
    embedConfig = {{
        type: 'report',// Supported types: report,dashboard,tile,visual and qna
        id: '<Report Id>',embedUrl: '<Embed Url>',accessToken: '<Access Token>',tokenType: models.TokenType.Embed,viewMode: models.ViewMode.Edit,settings: {
            panes: {
                filters: {
                    expanded: false,visible: false
                }
            },background: models.BackgroundType.Transparent,}
    }}

    eventHandlers = { 
        new Map([
            ['loaded',function () {console.log('Report loaded');}],['rendered',function () {console.log('Report rendered');}],['error',function (event) {console.log(event.detail);}]
        ])
    }
        
    cssClassName = { "report-style-class" }

    getEmbeddedComponent = { (embeddedReport) => {
        this.report = embeddedReport as Report;
    }}
/>

报表已正确嵌入,但是现在有人进行了更改之后,如何再次获取更新的报表实例,以便获得视觉效果并将其存储在数据库中?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)