Create new Power BI report embedded in Angular application

Discussão em 'Angular' iniciado por ps0604, Abril 14, 2025.

  1. ps0604

    ps0604 Guest

    I'm using Power BI embedded in an Angular application with Microsoft's library powerbi-client-angular

    This works fine viewing and editing a report that exists in Power BI Service. I'm trying now to create a new report (according to the library documentation, this is supported).

    I'm getting this error:


    Error: Attempted to embed component of type: create but did not find any matching component. Please verify the type you specified is intended.
    ​

    This is my embedConfig object:

    this.embedConfig = {
    type: 'create',
    embedUrl: 'https://app.powerbi.com/reportEmbed',
    accessToken: this.token, // the dataset token id
    datasetId: 'xxxxxxxxxxxxxx...'
    tokenType: models.TokenType.Embed,
    permissions: models.Permissions.ReadWrite,
    viewMode: models.ViewMode.Edit,
    settings: {
    panes: {
    filters: {
    expanded: false,
    visible: true
    }
    }
    }
    };


    and this is the HTML tag:

    <powerbi-report
    [embedConfig]="embedConfig"
    [cssClassName]="'container'"
    [phasedEmbedding]="false">
    </powerbi-report>


    Any ideas how to fix this? what value should I use in the 'type' attribute?

    Continue reading...

Compartilhe esta Página