1

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?

1 Answer 1

1

It's supported. But you're using the wrong selector.It will be powerbi-create-report.

Refer to this MSFT documentation Create an embedded report

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.