Page 6305 Emissions by Cat and Scope PBI

Sustainability, Microsoft.PowerBIReports

src/Apps/W1/Sustainability/app/src/PowerBI/Embedded/EmissionsbyCatandScopePBI.Page.al61 lines, Copyright (c) Microsoft Corporation. MIT

namespace Microsoft.PowerBIReports;using System.Integration.PowerBI;page 6305 "Emissions by Cat and Scope PBI"{    UsageCategory = ReportsAndAnalysis;    ApplicationArea = All;    PageType = UserControlHost;    Caption = 'Emissions by Category and Scope (Power BI)';    AboutTitle = 'About Emissions by Category and Scope (Power BI)';    AboutText = 'The Emissions by Scope report breakdowns each emission type and showcases this based on the Account Category and the Scope so you can see how each account and scope is tracking.';    layout    {        area(Content)        {            usercontrol(PowerBIAddin; PowerBIManagement)            {                ApplicationArea = All;                trigger ControlAddInReady()                begin                    SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl);                end;                trigger ReportLoaded(ReportFilters: Text; ActivePageName: Text; ActivePageFilters: Text; CorrelationId: Text)                begin                    SetupHelper.LogReportLoaded(CorrelationId);                end;                trigger ErrorOccurred(Operation: Text; ErrorText: Text)                begin                    SetupHelper.LogError(Operation, ErrorText);                    SetupHelper.ShowPowerBIErrorNotification(Operation, ErrorText);                end;            }        }    }    var        SetupHelper: Codeunit "Power BI Report Setup";        ReportId: Guid;        ReportPageLbl: Label '723552ce7d04d22dc0c5', Locked = true;    trigger OnOpenPage()    var        PowerBIReportsSetup: Record "PowerBI Reports Setup";    begin        SetupHelper.EnsureUserAcceptedPowerBITerms();#if not CLEAN27#pragma warning disable AL0801#endif        ReportId := SetupHelper.GetReportIdAndEnsureSetup(CurrPage.Caption(), PowerBIReportsSetup.FieldNo("Sustainability Report ID"));#if not CLEAN27#pragma warning restore AL0801#endif    end;}