Forum Discussion
Report Server publish to website using REST API
- Anonymous8 years ago
Yes. We discovered that we couldn't "embed" dashboards from the on premise version in the way that you can using the cloud version, all you can do is an iframe with some params passed through on the URL. We found this to be quite demanding in terms of infrastructure. You have no real control over the aspect ratio so using it to produce ribbons of charts above or to the side of other content proved impractical. rendering each micro chart as an embedded iFrame proved to be way too much demand on the server and indeed the client (each iFrame gets the entire javascript and angular app that renderss the PBI report)
If you are using the cloud version then there's a ton of API stuff for embedding using a REST API and stuff
https://docs.microsoft.com/en-gb/power-bi/developer/embed-sample-for-customers
But this only works for cloud deployed PBI, this fucntionality is not available on the on premise PBI-SSRS product.
So we resorted to using simple D3 charts for all of this. All these micro charts respond to slicers we have built into the app to control the time period you are looking at, the currency and the position in the business heirarchy to look at/start at etc. But the slicers change everything on the screen. each of the D3 charts issue DAX queries (that are parameterised) using an ADO.Net connection to a SSAS Tabular instance, the params get changed as the slicers get changed. So not really very interactive. Each micro chart does however provide a hyperlink to a PBI report that gives the same info on the same type of chart with drilldown and detail as well as other pages so you can explore the data properly and interactively in PowerBI. Some of the micro charts are more like KPIs and these link to conventional SSRS reports to show the detail behind a count of failed transactions for example. These reports open in a new browser TAB/Window but attach to the same tabular model so everthing uses the same data. Yes DAX into SSRS, its a joy!
We also have "shared" datasets in other PBI reports where the source isn't SSAS Tabular. We found we could create old fashioned SSRS datasets, the kind you would use in RDL reports. We can then deploy these DataSets and connect to them using the oData connector in PBI Desktop. This is explained in these blog posts
http://dataap.org/blog/2018/01/17/power-bi-report-using-ssrs-shared-datasets/
https://blog.crossjoin.co.uk/2017/10/15/exploring-the-new-ssrs-2017-api-in-power-bi/
This means we can have a common dataset used in different PBI reports. We could, in theory, query these oData sources with the same D3 charts we used in the dashboard instead of using DAX via ADO.Net.
Sorry if I just confused thingsin my original reply
I suspect you may need to get a new license for SQL Server 2016/2017. Make sure you get Enterprise Edition with Software Assurance to get you PBI-SSRS license for free.
You can only embed SSRS-PBI reports using an iframe. You can pass some parameters in as part of the URL/request but its pretty limited currently, hopefully the new version (due soon) will improve the functionality in this area. I'm not entirely sure how this will work security wise. I assume the service account for the service rendering your AngularJS website is passed as the auth user to PowerBI (AD integrated security is what you get out of the box) so that account would need some permissions to browse the reports.
The REST API is for managing the server and content not for rendering the reports. To quote from the API reference
https://app.swaggerhub.com/apis/edugonz/PBIRS/2.0
The Power BI Report Server REST API provides programmatic access to the report server catalog.
For example, basic CRUD operations can be done on folders, reports, KPIs, data sources, datasets, refresh plans, subscriptions, etc.
The REST API can also be used to provide more advanced functionality, such as:
- Navigate the folder hierarchy
- Discover the contents of a folder
- Download a report definition
- Modify default report parameters
- Change or execute a refresh plan
- A whole lot more
What it doesn't do is enable reports to be rendered. If you are looking for the datasets that are used by the reports then these aren't directly available. You can query old fashioned SSRS datasets via oData as the REST API provides oData endpoints for these via the REST API. But i suspect that's not what you are after.
We have implemented a set of internal dashboads here in an AngularJS web app and had intended to use PBI reports for various aspects. We've ended up doing most of them using a D3 graph library with queries to the Tabular model that sits behind all our PowerBI. This renders much smaller simpler charts way faster. The charts are more like KPIs. If the users click through on one of these micro charts they get bounced to a PowerBI report that gives them drilldown/slicer capability.
I cannot thank you enough for this outstanding detailed answer.
But through my investigations i heared that we can build the Website with embedded dashboards from Power BI using REST API Calls, but i guess that according to your experience you discovered that this is not applicable, am i right ?
Yet i am a bit confused regarding the oDATA part using the D3 Graph Library you used, is this a way to embed the powerbi dashobard in an Angular website that can be a responsive design with responsive dashboards ?
I am a bit new to embedding a dashboard or a report to a website, that's why i am bit overwhelming.
Thanks so much once more for your time.
- Anonymous8 years agoNot applicable
Yes. We discovered that we couldn't "embed" dashboards from the on premise version in the way that you can using the cloud version, all you can do is an iframe with some params passed through on the URL. We found this to be quite demanding in terms of infrastructure. You have no real control over the aspect ratio so using it to produce ribbons of charts above or to the side of other content proved impractical. rendering each micro chart as an embedded iFrame proved to be way too much demand on the server and indeed the client (each iFrame gets the entire javascript and angular app that renderss the PBI report)
If you are using the cloud version then there's a ton of API stuff for embedding using a REST API and stuff
https://docs.microsoft.com/en-gb/power-bi/developer/embed-sample-for-customers
But this only works for cloud deployed PBI, this fucntionality is not available on the on premise PBI-SSRS product.
So we resorted to using simple D3 charts for all of this. All these micro charts respond to slicers we have built into the app to control the time period you are looking at, the currency and the position in the business heirarchy to look at/start at etc. But the slicers change everything on the screen. each of the D3 charts issue DAX queries (that are parameterised) using an ADO.Net connection to a SSAS Tabular instance, the params get changed as the slicers get changed. So not really very interactive. Each micro chart does however provide a hyperlink to a PBI report that gives the same info on the same type of chart with drilldown and detail as well as other pages so you can explore the data properly and interactively in PowerBI. Some of the micro charts are more like KPIs and these link to conventional SSRS reports to show the detail behind a count of failed transactions for example. These reports open in a new browser TAB/Window but attach to the same tabular model so everthing uses the same data. Yes DAX into SSRS, its a joy!
We also have "shared" datasets in other PBI reports where the source isn't SSAS Tabular. We found we could create old fashioned SSRS datasets, the kind you would use in RDL reports. We can then deploy these DataSets and connect to them using the oData connector in PBI Desktop. This is explained in these blog posts
http://dataap.org/blog/2018/01/17/power-bi-report-using-ssrs-shared-datasets/
https://blog.crossjoin.co.uk/2017/10/15/exploring-the-new-ssrs-2017-api-in-power-bi/
This means we can have a common dataset used in different PBI reports. We could, in theory, query these oData sources with the same D3 charts we used in the dashboard instead of using DAX via ADO.Net.
Sorry if I just confused thingsin my original reply
- PeterNagy8 years agoFrequent Visitor
Thanks so much for your outstanding help, it is much appreciated.