microsoft / powerbi-report-authoring

A library for authoring Power BI reports while embedded into your apps. Provides service which makes it easy to change report and visual elements in session. It gives APIs such as creating visual, changing visual properties, etc ...
MIT License
40 stars 18 forks source link

addPage method #12

Closed saviourofdp closed 3 years ago

saviourofdp commented 3 years ago

Apologies if I've completely misunderstood this, but how do I access the addPage() method as documented here https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/page-operations#add-a-page

Add a page

To add a new page to the current report, use the addPage method of the Power BI Client Report class:

addPage(displayName?: string): Promise<Page>
  • displayName sets the display name for the new page. If not specified, the display name is set to Page#<NUM>.
  • The function returns a Page instance of the new page.

For example, add a page with the display name Sales to the current report:

let newPage = await report.addPage("Sales");

I thought it was an extension applied to the core client library implemented within this library but it doesn't seem to be?

saviourofdp commented 3 years ago

Sorry I made a mistake - I had updated the Power BI client library but the browser was still serving a cached version of the older version. The method is in the core library, not this authoring library.