Forum Discussion
create new report using powerbi-client-react
Hi, Anonymous
I am glad to help you.
There is no create() method in the Power BI JavaScript API.
const [report, setReport] = useState();
const onCreate = () => {
report.create()
}
You can create, edit, and save embedded reports in a React app according to the official documentations, hope they helps:
How to embed a Power BI item in a React app | Microsoft Learn
Create, edit, and save an embedded report | Microsoft Learn
You can also refer to this blog, hope it helps:
How to Embed A Power BI Report in React | by Diksha Chhablani | Globant | Medium
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous1 year agoNot applicable
I am trying to following the example from this screenshot in the link:
Create, edit, and save an embedded report | Microsoft Learn
I am still getting 'createReport is not a function'.
Do you have a link to an example of creating a new report using the powerbi-client-react library?
Also do you have the link for the CreateReportEmbedUrl?
- powergb1 year agoNew Member
You can retrieve the embeddedUrl from the dataset list:
https://api.powerbi.com/v1.0/myorg/groups/[groupid]/datasets