Forum Discussion
Base URL in embedded report
- 1 year ago
Thanks for the response. Yes we want urls that point to the specific tenants domain.
After a restless night I found a solution....
In PowerBI we modified our urls to have a placeholder for the base url e.g. www.BASE.URL/api/xxxxx
We changed the default hyperlink behaviour to RaiseEvent and not open the urls.
We then attached a handler to the dataHyperlinkClicked event:
https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/handle-events#datahyperlinkclicked
This handler then replaced "base.url" with the browsers current domain and opens it in a new window.
This achieves the required functionality.
Hi MattPilWork ,
According to your statement, I think your requirement is to link to report dynamicly based on user and tenant.
As far as I know, the pbi report does not contain methods to extract data from external parameters (urlstring, seession, cookie, etc.).
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- MattPilWork1 year agoNew Member
Thanks for the response. Yes we want urls that point to the specific tenants domain.
After a restless night I found a solution....
In PowerBI we modified our urls to have a placeholder for the base url e.g. www.BASE.URL/api/xxxxx
We changed the default hyperlink behaviour to RaiseEvent and not open the urls.
We then attached a handler to the dataHyperlinkClicked event:
https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/handle-events#datahyperlinkclicked
This handler then replaced "base.url" with the browsers current domain and opens it in a new window.
This achieves the required functionality.