Rules / Report Design

No landing page set

info LANDING_PAGE_NOT_SET · built in · report layer · scope: Report

What it checks

A report whose pages.json sets no landing page, so it opens on the page that was active when it was last saved, or, when pages.json records no active page either, on the first page.

The finding is on the report, as Report, at the activePageName line of pages.json, or on line 1 when pages.json records no active page, and its detail names the page the report opens on now, as opens on "Products", the page open when it was saved or opens on "Overview", the first page. When the active page names a page the report does not have, the detail says so rather than naming one: no landing page set; the active page "5f1e2a0c9b7d43e6a8f1" does not exist.

Example

Fires the rule
{
  "definition/pages/pages.json": {
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/pagesMetadata/1.0.0/schema.json",
    "pageOrder": ["p1", "p2"],
    "activePageName": "p2"
  },
  "definition/pages/p1/page.json": {
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/2.1.0/schema.json",
    "name": "p1",
    "displayName": "Overview",
    "displayOption": "FitToPage",
    "height": 720,
    "width": 1280
  },
  "definition/pages/p2/page.json": {
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/2.1.0/schema.json",
    "name": "p2",
    "displayName": "Products",
    "displayOption": "FitToPage",
    "height": 720,
    "width": 1280
  }
}
After the fix
{
  "definition/pages/pages.json": {
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/pagesMetadata/1.1.0/schema.json",
    "pageOrder": ["p1", "p2"],
    "activePageName": "p2",
    "landingPageName": "p1"
  },
  "definition/pages/p1/page.json": {
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/2.1.0/schema.json",
    "name": "p1",
    "displayName": "Overview",
    "displayOption": "FitToPage",
    "height": 720,
    "width": 1280
  },
  "definition/pages/p2/page.json": {
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/2.1.0/schema.json",
    "name": "p2",
    "displayName": "Products",
    "displayOption": "FitToPage",
    "height": 720,
    "width": 1280
  }
}

The report was last saved while Products was open, so that is where it opens: opens on "Products", the page open when it was saved. The fix makes Overview the landing page, which takes the 1.1.0 schema in pages.json, and the page that was active when the report was saved no longer decides.

Why it matters

Without a landing page, the page a reader starts on is whichever page the last author happened to have open when they saved or published. Check a detail page, save, and publish, and every reader now opens the report on that detail page instead of the overview it was built to start from. A landing page takes the accident out: Power BI opens the report on it for every reader, whatever page was active when the report was last saved.

How to fix it

In Power BI Desktop, right-click the tab of the page readers should start on and select Set as landing page; an icon on the tab marks it. Or, with nothing selected on the page, open the Format pane, expand Page information, and turn on Landing page. Only one page can be the landing page, so setting another moves it.

In pages.json, set landingPageName to the page's name from its page.json, not its display name, as in the example. The property needs the pagesMetadata 1.1.0 schema, so update $schema to that version when you add it by hand.

When to ignore it

A report with a single page opens on that page whatever pages.json says, so a landing page adds nothing there. Ignore the finding on a one-page report you do not expect to grow.

This rule reports on the report itself, so there is no object to annotate. To turn the rule off for a whole project, set "LANDING_PAGE_NOT_SET": "off" under rules in pbiplint.config.json.

Quirks

Check a report for this Improve this page