Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 17899

Single visual embedding - getting names of pages and visuals?

$
0
0

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.


Viewing all articles
Browse latest Browse all 17899

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>