cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
danielearwicker Frequent Visitor
Frequent Visitor

Single visual embedding - getting names of pages and visuals?

As shown in:

 

https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html#

 

we have to provide pageName and visualName. These are strings that don't seem to be discoverable from the report designer. If I design a report with pages and visuals on those pages, how do I discover the strings I need to use to display one visual?

 

The names don't seem to be displayed or modifiable anywhere. If I could put one visual per page and then use the page name to show the right visual, that would work. But it turns out that pages have two names: the name and the displayName. The name is used in embedding but is apparently not displayed/editable anywhere. The displayName can be edited in the report designer, but is not the right thing to use in embedding.

 

I know I can get them at the client by embedding the report, waiting for the loaded event, calling getPages on the report and then getVisuals on each page. But that suggests I would need to create a hidden element to embed the report into, go through all those steps, so I could search for the right page (by its display name?) and take its first visual.

 

I guess I'm missing something obvious.

6 REPLIES 6
Microsoft v-micsh-msft
Microsoft

Re: Single visual embedding - getting names of pages and visuals?

If here you prefer to embed the Visual, then the report and report page for the visual are required.

 

Or you may consider to embed the tile in a dashboard:

Integrate a tile into an App

 

Regards,

Michael

 

gbrueckl Frequent Visitor
Frequent Visitor

Re: Single visual embedding - getting names of pages and visuals?

did you ever solve this?

I am currently running into the very same issue.

Using the name for the visual returned by getVisuals() does not seem to work 

danielearwicker Frequent Visitor
Frequent Visitor

Re: Single visual embedding - getting names of pages and visuals?

Not really. The necessary names are in the .pbix file but you have to unzip it, and then unzip some nested .zip inside it, and then use guesswork to find the names. It's really inconvenient.

 

 

Dan_Cundy Frequent Visitor
Frequent Visitor

Re: Single visual embedding - getting names of pages and visuals?

I'm guessing no-one has worked out an easy way yo do this yet?
nfadili Frequent Visitor
Frequent Visitor

Re: Single visual embedding - getting names of pages and visuals?

The fact that the powerbi-client library allows specifying a 'default page' implies that these names would be discoverable somehow. https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details#options

 

Has anybody figured this out yet? The only way I have found to get the page 'name' is by calling 'report.getPages()', at which point there's no point in being able to specify a default page when embedding.

Gwhiz Regular Visitor
Regular Visitor

Re: Single visual embedding - getting names of pages and visuals?

You have to use Power BI service and get the name from the url, it will show as "ReportSectionff84e9ab2bc3f5fb5f74"

 

Then you just plop that into the embeded URL: &pageName=ReportSectionff84e9ab2bc3f5fb5f74 and whalla, they seemed to have changed to a new URL scheme without telling us leaving us clueless when trying to embed only a certain page

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Kudoed Authors