HCFL Gov Power BI Report Viewer

Embedding Reports with Custom Settings

You can customize the appearance and behavior of embedded Power BI reports by passing configuration settings as a query parameter. The application accepts a settings query parameter that allows you to configure various aspects of the report embedding.

Basic Usage

To embed a report with custom settings, append a settings query parameter to the report URL. The settings can be provided as a URL-encoded JSON object.

URL Format:

/groups/{workspaceId}/reports/{reportId}?settings={urlEncodedJson}

Example:

/groups/abc123/reports/def456?settings=%7B%22panes%22%3A%7B%22pageNavigation%22%3A%7B%22visible%22%3Afalse%7D%7D%7D

Available Settings

The following settings are available based on the Power BI JavaScript API documentation:

Panes Configuration

Control the visibility and expansion state of various panes in the report:

{
  "panes": {
    "bookmarks": {
      "visible": true
    },
    "fields": {
      "expanded": false,
      "visible": true
    },
    "filters": {
      "expanded": false,
      "visible": true
    },
    "pageNavigation": {
      "visible": false,
      "position": "Left"
    },
    "selection": {
      "visible": true
    },
    "syncSlicers": {
      "visible": true
    },
    "visualizations": {
      "expanded": false,
      "visible": true
    }
  }
}

Pane Properties:

  • bookmarks - Controls bookmark pane (supports visible only)
  • fields - Controls fields pane (supports visible and expanded)
  • filters - Controls filter pane (supports visible and expanded)
  • pageNavigation - Controls page navigation (supports visible and position: "Left" or "Bottom")
  • selection - Controls selection pane (supports visible only)
  • syncSlicers - Controls sync slicers pane (supports visible only)
  • visualizations - Controls visualizations pane (supports visible and expanded)

Bars Configuration

Control the visibility of action bar and status bar:

{
  "bars": {
    "actionBar": {
      "visible": true
    },
    "statusBar": {
      "visible": true
    }
  }
}

Note: The bars property only applies when the report is in edit mode.

Background

Set the background to transparent:

{
  "background": "Transparent"
}

Locale Settings

Configure language and formatting:

{
  "localeSettings": {
    "language": "en-us"
  }
}

Note: Locale settings cannot be changed after the report is loaded. To change locale, reload the page with new settings.

Control how hyperlinks behave in tables and matrices:

{
  "hyperlinkClickBehavior": "RaiseEvent"
}

Available values:

  • "Navigate" - Opens URL in new window (default)
  • "NavigateAndRaiseEvent" - Opens URL and raises event
  • "RaiseEvent" - Prevents default navigation and raises event

Error Handling

Hide default error messages:

{
  "hideErrors": true
}

Common Examples

Hide Page Navigation

{
  "panes": {
    "pageNavigation": {
      "visible": false
    }
  }
}

URL Encoded:

?settings=%7B%22panes%22%3A%7B%22pageNavigation%22%3A%7B%22visible%22%3Afalse%7D%7D%7D

Hide Filter Pane

{
  "panes": {
    "filters": {
      "visible": false
    }
  }
}

URL Encoded:

?settings=%7B%22panes%22%3A%7B%22filters%22%3A%7B%22visible%22%3Afalse%7D%7D%7D

Transparent Background with Hidden Navigation

{
  "background": "Transparent",
  "panes": {
    "pageNavigation": {
      "visible": false
    },
    "filters": {
      "visible": false
    }
  }
}

URL Encoded:

?settings=%7B%22background%22%3A%22Transparent%22%2C%22panes%22%3A%7B%22pageNavigation%22%3A%7B%22visible%22%3Afalse%7D%2C%22filters%22%3A%7B%22visible%22%3Afalse%7D%7D%7D

Custom Locale with Hidden Panes

{
  "localeSettings": {
    "language": "es-es"
  },
  "panes": {
    "pageNavigation": {
      "visible": false
    },
    "filters": {
      "visible": true,
      "expanded": false
    }
  }
}

Reference

For complete documentation on all available settings, see the Microsoft Power BI JavaScript API documentation.