Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Keesh
New Member

Bookmark export functionality in REACT pbi report

Hi,

I have implemented a pbi report using the react implementation similar to this demo .

I am trying to implement export functionality via the bookmark method similar to the JS bookmark method here .

 

Unfortunately trying to capture the report state via:

report.booksmarksManager.capture()
produces this error:

powerbi.js:1256 Uncaught (in promise) TypeError: Cannot read property 'toLowerCase' of undefined

 

This seems to be attributed to the values in bookmarksManager.config being undefined and never getting populated and this appears to also be the case in react demo.

Is there a way to populate the values in bookmarksManager.config and export reports using this method in a react implementation?

 

Thanks,

Keesh

2 REPLIES 2
Anonymous
Not applicable

I got something working but it's hacky:

 

 report.on('rendered', async () => {
  report.bookmarksManager.config = report.config; // this stops the errors for now
  const bookmarks = await report.bookmarksManager.getBookmarks();

 

Really frustrating though. Looks like there's a bug in the js package.

getBookmarks calls isRDLEmbed which expects this.config.embedUrl to be defined, but it's only defined on the report, not the bookmarksManager.

  

https://github.com/microsoft/PowerBI-JavaScript/blob/34a899547e1aa3428a2408c578786495fc541a7d/src/ut...

https://github.com/microsoft/PowerBI-JavaScript/blame/master/src/bookmarksManager.ts#L62

 

Also the official docs about loading a bookmark by name using static config doesn't seem to work either:

https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings#on-load-b...

 

Tried downgrading to 2.14.1 as suggested here
https://community.powerbi.com/t5/Service/Power-BI-Bookmark-for-Embedded-report-Capture-api-not-worki...

But the only thing that worked for me was setting bookmarksManager.config

 

Edit:

Looks like there's already a pr that'd stop the error. Not sure it'd fix the whole problem though, since the bookmarkManager still wouldn't have config defined.

https://github.com/microsoft/PowerBI-JavaScript/pull/365

Anonymous
Not applicable

@Keesh 

 

Did you ever figure out the solution for this? I am getting the same error when calling "apply(...)".

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.