Difference between revisions of "Power BI Visual"
(→Update "SameSite" cookie handling)
(→Using the custom visual)
|(2 intermediate revisions by 2 users not shown)|
|Line 66:||Line 66:|
<httpCookies … requireSSL="true" httpOnlyCookies="true" sameSite="
<httpCookies … requireSSL="true" httpOnlyCookies="true" sameSite="" />
<sessionState … cookieSameSite="None" />
<sessionState … cookieSameSite="None" />
|Line 116:||Line 116:|
You can now select a report from your web server:
You can now select a report from your web server :
Latest revision as of 11:47, 6 December 2021
Enterprise XLCubedWeb users can now embed and link XLCubedWeb reports into PowerBI reports
- You need the custom visual, please contact firstname.lastname@example.org with the full URL of your XLCubedWeb server (as entered by the users)
- The XLCubedWeb server must be running as HTTPS
- You will need to be running V9.1.49 or above
- You need to be licensed for an Enterprise XLCubedWeb server
- Using PowerBI cloud or PowerBI Report Server (March 2018 or later)
As PowerBI and XLCubedWeb will be hosted on different servers you need to enable cross-domain access (CORS) on XLCubedWeb, this will allow PowerBI to intergrate correctly with XLCubedWeb.
Please ensure you are running the latest windows updates.
From XLCubed V9.2, this procedure can be carried out automatically through the XLCubedWeb config application (Enable PowerBI Visual Support, on the Advanced tab).
Set Handler order
In IIS (Internet Information Services) Manger on the XLCubedWeb server, go to the XLCubedWeb Application and "Handler Mappings":
Click "View Ordered list":
You need to ensure "OPTIONSVerbHandler" appears above all the *.svc entries:
Please note: after changing the order please go back to "Unordered List" and then "Ordered List" to ensure it is in the correct place, you may need to do this a few times to ensure it saves.
Add custom headers
You will need to add the following headers under "Http Response Headers":
Access-Control-Allow-Origin * Access-Control-Allow-Headers Accept,X-Requested-With,X-Prototype-Version,Content-Type,Cache-Control,Pragma,Origin,Set-Cookie,Cookie Access-Control-Request-Method POST Access-Control-Allow-Methods GET, POST, PUT, DELETE, OPTIONS Access-Control-Allow-Credentials true
or via the web.config:
<system.webServer> <defaultDocument /> <httpProtocol> <customHeaders> <remove name="X-Powered-By" /> <add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Control-Allow-Headers" value="Accept,X-Requested-With,X-Prototype-Version,Content-Type,Cache-Control,Pragma,Origin,Set-Cookie,Cookie" /> <add name="Access-Control-Request-Method" value="POST" /> <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" /> <add name="Access-Control-Allow-Credentials" value="true" /> </customHeaders> </httpProtocol>
Add the following settings to the appropriate sections of the web.config, if the setting exists just add the new attributes, otherwise create a new entry (excluding the "..."):
<system.web> <httpCookies … requireSSL="true" httpOnlyCookies="true" sameSite="None" /> <sessionState … cookieSameSite="None" />
Windows Authentication changes
To support windows authentication with the custom visual, there are some additional changes needed. It will also only work fully in Microsoft Edge or Google Chrome. The web browser will send a pre-flight OPTIONS request to check the server can accept the windows credentials. XLCubedWeb will need to be set to allow anonymous OPTIONS requests. To do this:
Update the following header:
<add name="Access-Control-Allow-Origin" value="null" />
Enable anonymous access:
In the web.config, update the following section:
<authentication mode="Windows" />
<authentication mode="Windows" /> <authorization> <allow verbs="OPTIONS" users="*" /> <deny users="?" /> </authorization>
This allows the pre-flight request to return without credentials but leaves the rest of the requests and the website to require authentication.
Using the custom visual
Inserting a report
While editing a PowerBI report, go to the "Import a custom visual" option under visualizations:
Browse to the custom visual and select the custom visual package, you will get a new Icon under visualizations:
You can use this to insert a report object:
Add a parameter to the control:
You can now select a report from your web server (note, you need to be editing the report in PowerBI online, not Desktop, in order to pick a report with this button. See Limitations):
And it will be embedded:
Linking reports via web parameters
When linking to fields on the report, the value for this will be passed to the report via any Web Parameters that match the attribute name
You can set other options for the visual, such as the server name, whether to show sheet tabs etc.:
- Only one member for each parameter will be passed to the report, if several members are picked then a "blank" will be passed so any range driven items would revert to the default member
- PowerBI connected reports will prompt for a login when opening the report for the first time
- When setting up the report in Power BI Report Server, using the desktop version of Power BI you can't use the UI to browse to a report and will have to enter the report path manually. The report will only be shown once viewed in the browser