cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syeda2109 Frequent Visitor
Frequent Visitor

Re: Angular 2 and Power BI Embedded

Hi ! @gauz09 I tried every steps but still my code isn't working. Can you look over this issue? Any advice will be appriciatable.

 

HTML Code:

 

                <div id="pbicontainer" style="height:800px;"></div>

Type script:

 

import { NgxPowerBiService } from 'ngx-powerbi';

 getReport() {
        
        const config = {
            type: 'report',
            id: 'b5f50796-6e97-4dc5',
            embedUrl:
                'https://app.powerbi.com/dashboardEmbed? 
                 dashboardId=b5f50796-6e97&groupId=be8908da-da25- 
                 452ed&config=eyJjbHVzdGVyVXJsIj',
            accessToken: "H4sIAAAAAAAEAB1Wt86F",
            settings: {
                filterPaneEnabled: true,
                navContentPaneEnabled: true
            }
        };

        // Grab the reference to the div HTML element that will host the report.
        let pbicontainer = <HTMLElement>document.getElementById('pbicontainer');
        let report = this.powerBiService.embed(pbicontainer, config);


        // Report.off removes a given event handler if it exists.
        report.off("loaded");

        // Report.on will add an event handler which prints to Log window.
        report.on("loaded", function () {
            console.log("Loaded");
        });
    }

 

Helpful resources

Announcements
Community Highlights

Community Highlights

Find out what's new in the Power BI Community!

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 307 members 3,513 guests
Please welcome our newest community members: