Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

277
Views
powerbi-client-react - Property 'getPages' does not exist on type 'Embed'

I am using powerbi-client-react in a typescript project. I wanna use the report instance to read out the from/to values of a date-slicer on an active page. the problem is, when I am setting the getEmbeddedComponent attribute on my PowerBIEmbed component, then the handed report has not all methods that are listed in the powerbi javascript api docu. For example I need report.getPages() to access the slicer states but the method is not found on the report instance, which is of type embed.

Thx for any kind of help

            getEmbeddedComponent={(embeddedReport) => {
              const pages = embeddedReport.getPages();
            }}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

For React wrapper, getEmbeddedComponent returns Embed object, which does not have the getPages() function on it.

If you want to use getPages(), then please typecast the Embed object as Report.

The following code snippet will work:

getEmbeddedComponent = {(embedObject: Embed) => {
    const pages = (embedObject as Report).getPages();
}};

Reference: https://docs.microsoft.com/rest/api/power-bi/reports/get-pages

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!