power-bi-embedded-reports-reactive
Reactive icon

Power BI Embedded Reports (Reactive)

Stable version 1.1.0 (Compatible with OutSystems 11)
Uploaded
 on 9 May (3 weeks ago)
 by 
0.0
 (0 ratings)
power-bi-embedded-reports-reactive

Power BI Embedded Reports (Reactive)

Documentation
1.1.0

Service Principal settings must now be edited directly in Service Center.

Added 3 new optional parameters to the EmbeddedReportsBlock

ZoomLevel is a decimal between 0.25 and 4 (those are the supported zoom levels according to the Microsoft Documentation). If a value outside those limits is sent, it will default to 1 (100%).

ShowZoomBar is a boolean value that allows the developer to show or hide the zoom bar.

Slicers is a string variable that should be sent in a JSON format, the block will parse the filters and send them as load settings. For more information on how to build the slicer objects check Use slicers in Power BI embedded analytics | Microsoft Learn.

Note: Remember to add a valid JSON in the slicers, if the object can't be parsed it will be sent as null and the slicers value won't be applied. Here is a sample valid JSON

[

  {

    "selector": {

      "$schema": "http://powerbi.com/product/schema#visualSelector",

      "visualName": "ed1039ba120e28456657"

    },

    "state": {

      "filters": [{

        "$schema": "http://powerbi.com/product/schema#basic",

    "target": {

        "table": "TableName",

        "column": "ColumnName"

    },

    "filterType": 1,

    "operator": "In",

    "values": ["abcd"]

      }]

    }

  }

]


1.0.0

URL FIlter Generator

The Test Reports Screen now has a URL Filter Generator popup that will help the user build URL filters.

Just add the desired filters and click on Generate and Send to Screen. The generated filter will be automatically populated in the Parameters input.


Get Filters (Console)

This link will print in the developer tools console the current state of the report filters.

Parse Filter Array

This will let you add a filter array to your report. Make sure you pass a Filter Array in a correct JSON format, click on Parse Filter and then on Apply Filter. The filters will be applied to your embedded report.

The report must be loaded before using these actions.


Parse Slicer State

This will let you change a slicer state in your report. Make sure you pass the Slicer Visual Name and Slicer State in the correct JSON format, click on Parse State and then on Apply Slicer State. The slicer in your report will be updated.

The report must be rendered, and the visual must be in the active page before using these actions.


0.1.1
  • No changes from 0.1.0.

0.1.0

Setup a Service Principal as shown in this guide: Embed Power BI content in an embedded analytics application with service principal and an application secret - Power BI | Microsoft Learn 

Open Service Center (PowerBI_CS module) and set all the site properties:

GrantType value could be: client_credentials

Scope should be: https://analysis.windows.net/powerbi/api/.default

Open the Reports screen and add the reports you want to embed:

Add a report name, the Embed URL, the report GUID and at least a Dataset and a Report.

*Note: The Main Report GUID should also be included in the "Reports" or the "Effective Identities" section depending on your report.

Once a report is added, you can test it on the TestReports Screen:

The parameters section takes the report filters as shown in Filter a report using query string parameters in the URL - Power BI | Microsoft Learn or URL parameters in paginated reports in Power BI - Power BI | Microsoft Learn 

To embed a report in a different app/screen, use the EmbeddedReportBlock, which takes a PowerBIReportId as an input. The PowerBIReport table is public so you can retrieve report names and Ids.