From 6ee2ecf68538e22a450610e53a3c256d18c1cd87 Mon Sep 17 00:00:00 2001 From: Yusheng Shu Date: Mon, 10 Aug 2026 10:14:52 +1000 Subject: [PATCH 1/7] Updated where-used caption --- .../Finance/FinancialReports/FinancialReportMgt.Codeunit.al | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportMgt.Codeunit.al b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportMgt.Codeunit.al index 0635243d59e..f404c68ed17 100644 --- a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportMgt.Codeunit.al +++ b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportMgt.Codeunit.al @@ -521,11 +521,12 @@ codeunit 18 "Financial Report Mgt." procedure FindGLAccountWhereUsedInAccScheduleLine(GLAccNo: Code[20]; var TempGLAccWhereUsed: Record "G/L Account Where-Used" temporary): Boolean var AccScheduleLine: Record "Acc. Schedule Line"; + AccScheduleName: Record "Acc. Schedule Name"; begin FilterAccScheduleLineByGLAccount(AccScheduleLine, GLAccNo); if AccScheduleLine.FindSet() then begin TempGLAccWhereUsed."Table ID" := Database::"Acc. Schedule Line"; - TempGLAccWhereUsed."Table Name" := CopyStr(AccScheduleLine.TableCaption(), 1, MaxStrLen(TempGLAccWhereUsed."Table Name")); + TempGLAccWhereUsed."Table Name" := CopyStr(AccScheduleName.TableCaption(), 1, MaxStrLen(TempGLAccWhereUsed."Table Name")); TempGLAccWhereUsed."Field Name" := CopyStr(AccScheduleLine.FieldCaption(Totaling), 1, MaxStrLen(TempGLAccWhereUsed."Field Name")); repeat TempGLAccWhereUsed."Key 1" := AccScheduleLine."Schedule Name"; @@ -551,12 +552,13 @@ codeunit 18 "Financial Report Mgt." procedure FindGLAccountWhereUsedInColumnLayout(GLAccNo: Code[20]; var TempGLAccWhereUsed: Record "G/L Account Where-Used" temporary): Boolean var ColumnLayout: Record "Column Layout"; + ColumnLayoutName: Record "Column Layout Name"; begin FilterColumnLayoutByGLAccount(ColumnLayout, GLAccNo); if not ColumnLayout.FindSet() then exit(false); TempGLAccWhereUsed."Table ID" := Database::"Column Layout"; - TempGLAccWhereUsed."Table Name" := CopyStr(ColumnLayout.TableCaption(), 1, MaxStrLen(TempGLAccWhereUsed."Table Name")); + TempGLAccWhereUsed."Table Name" := CopyStr(ColumnLayoutName.TableCaption(), 1, MaxStrLen(TempGLAccWhereUsed."Table Name")); TempGLAccWhereUsed."Field Name" := CopyStr(ColumnLayout.FieldCaption("G/L Account Totaling"), 1, MaxStrLen(TempGLAccWhereUsed."Field Name")); repeat TempGLAccWhereUsed."Key 1" := ColumnLayout."Column Layout Name"; From c891260bc2a7b14414bfa86413e7717015051771 Mon Sep 17 00:00:00 2001 From: Yusheng Shu Date: Mon, 10 Aug 2026 10:20:27 +1000 Subject: [PATCH 2/7] Group run report actions --- .../FinancialReports/FinancialReports.Page.al | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReports.Page.al b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReports.Page.al index 9c2c666aa21..2fcb5cc136b 100644 --- a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReports.Page.al +++ b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReports.Page.al @@ -401,10 +401,15 @@ page 108 "Financial Reports" } area(Promoted) { - actionref(ViewFinancialReport_Promoted; ViewFinancialReport) { } - actionref(Print_Promoted; Print) { } - actionref(Packages_Promoted; Packages) { } - + group(RunReport) + { + Caption = 'Run Report'; + ShowAs = SplitButton; + actionref(ViewFinancialReport_Promoted; ViewFinancialReport) { } + actionref(Print_Promoted; Print) { } + actionref(Packages_Promoted; Packages) { } + actionref(Schedules_Promoted; Schedules) { } + } group(Category_Edit) { Caption = 'Definitions'; @@ -416,7 +421,6 @@ page 108 "Financial Reports" actionref(ShowAllRowDefinitions_Promoted; ShowAllRowDefinitions) { } actionref(ShowAllColumnDefinitions_Promoted; ShowAllColumnDefinitions) { } actionref(ShowAllCategories_Promoted; ShowAllCategories) { } - actionref(Schedules_Promoted; Schedules) { } } group(CopyExportImport) { From 218a7cf232220820e38aacd8fc59dbb42ab88e29 Mon Sep 17 00:00:00 2001 From: Yusheng Shu Date: Mon, 10 Aug 2026 10:53:02 +1000 Subject: [PATCH 3/7] Override export name with package name --- .../FinReportExportNameHandler.Codeunit.al | 31 +++++++++++++++++++ .../FinancialReportExportJob.Codeunit.al | 5 ++- .../FinancialReportPackages.Page.al | 5 ++- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 src/Layers/W1/BaseApp/Finance/FinancialReports/FinReportExportNameHandler.Codeunit.al diff --git a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinReportExportNameHandler.Codeunit.al b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinReportExportNameHandler.Codeunit.al new file mode 100644 index 00000000000..ab29d6950a2 --- /dev/null +++ b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinReportExportNameHandler.Codeunit.al @@ -0,0 +1,31 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.Finance.FinancialReports; +using Microsoft.Foundation.Reporting; +using System.IO; + +codeunit 8362 FinReportExportNameHandler +{ + Access = Internal; + + var + OutputFilename: Text; + + procedure Init(NewOutputFilename: Text) + begin + BindSubscription(this); + OutputFilename := NewOutputFilename; + end; + + [EventSubscriber(ObjectType::Codeunit, Codeunit::ReportManagement, OnGetFilename, '', false, false)] + local procedure ReportManagement_OnGetFilename(ReportID: Integer; var Filename: Text) + var + FileMgt: Codeunit "File Management"; + begin + if ReportID = Report::"Account Schedule" then + Filename := FileMgt.CreateFileNameWithExtension(OutputFilename, FileMgt.GetExtension(Filename)); + + end; +} \ No newline at end of file diff --git a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportExportJob.Codeunit.al b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportExportJob.Codeunit.al index 76b2288a621..1431ebd7c72 100644 --- a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportExportJob.Codeunit.al +++ b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportExportJob.Codeunit.al @@ -257,6 +257,7 @@ codeunit 8361 "Financial Report Export Job" FinReportPackageReport: Record "Fin. Report Package Report"; FinRepPackageExportLog: Record "Fin. Rep. Package Export Log"; AccountSchedule: Report "Account Schedule"; + FinReportExportNameHandler: Codeunit FinReportExportNameHandler; Email: Codeunit Email; EmailMessage: Codeunit "Email Message"; TempBlob: Codeunit "Temp Blob"; @@ -309,8 +310,10 @@ codeunit 8361 "Financial Report Export Job" AccountSchedule.SetRunForExport(); TempBlob.CreateOutStream(OutStr); OnBeforeSaveAccountSchedule(FinRepPackageSchedule, FinReportPackageReport, AccScheduleParam, AccountSchedule, OutStr, IsHandled); - if not IsHandled then + if not IsHandled then begin + FinReportExportNameHandler.Init(FinRepPackage.Code); AccountSchedule.SaveAs(AccScheduleParam, ReportFormat::PDF, OutStr); + end; TempBlob.CreateInStream(InStr); ReportDescription := StrSubstNo('%1 (%2)', diff --git a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportPackages.Page.al b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportPackages.Page.al index ecd3fc1f37e..bf5de74c5ed 100644 --- a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportPackages.Page.al +++ b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportPackages.Page.al @@ -58,6 +58,7 @@ page 8371 "Financial Report Packages" FinReportPackageReport: Record "Fin. Report Package Report"; AccountSchedule: Report "Account Schedule"; FinancialReportExportJob: Codeunit "Financial Report Export Job"; + FinReportExportNameHandler: Codeunit FinReportExportNameHandler; AccScheduleParam: Text; IsHandled: Boolean; begin @@ -70,8 +71,10 @@ page 8371 "Financial Report Packages" AccountSchedule.AddPackageReportToAppend(FinReportPackageReport); until FinReportPackageReport.Next() = 0; OnBeforePrintAccountSchedule(Rec, AccountSchedule, AccScheduleParam, IsHandled); - if not IsHandled then + if not IsHandled then begin + FinReportExportNameHandler.Init(Rec.Code); AccountSchedule.Print(AccScheduleParam); + end end; } } From ba69f6f3981aff273e08d5dd19b33108d6bd5534 Mon Sep 17 00:00:00 2001 From: Yusheng Shu Date: Mon, 10 Aug 2026 11:05:55 +1000 Subject: [PATCH 4/7] Override export name with package name --- .../FinancialReports/FinReportExportNameHandler.Codeunit.al | 1 + .../W1/BaseApp/Finance/FinancialReports/FinancialReports.Page.al | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinReportExportNameHandler.Codeunit.al b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinReportExportNameHandler.Codeunit.al index ab29d6950a2..774df665408 100644 --- a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinReportExportNameHandler.Codeunit.al +++ b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinReportExportNameHandler.Codeunit.al @@ -9,6 +9,7 @@ using System.IO; codeunit 8362 FinReportExportNameHandler { Access = Internal; + EventSubscriberInstance = Manual; var OutputFilename: Text; diff --git a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReports.Page.al b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReports.Page.al index 2fcb5cc136b..688e68fdc8c 100644 --- a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReports.Page.al +++ b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReports.Page.al @@ -404,7 +404,6 @@ page 108 "Financial Reports" group(RunReport) { Caption = 'Run Report'; - ShowAs = SplitButton; actionref(ViewFinancialReport_Promoted; ViewFinancialReport) { } actionref(Print_Promoted; Print) { } actionref(Packages_Promoted; Packages) { } From 322b50e396d9d80ba2d57e1eae9144c32aee5835 Mon Sep 17 00:00:00 2001 From: Yusheng Shu Date: Mon, 10 Aug 2026 11:24:39 +1000 Subject: [PATCH 5/7] Added about text --- .../Finance/FinancialReports/FinancialReportPackages.Page.al | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportPackages.Page.al b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportPackages.Page.al index bf5de74c5ed..b339875e8d7 100644 --- a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportPackages.Page.al +++ b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinancialReportPackages.Page.al @@ -8,6 +8,8 @@ using System.Threading; page 8371 "Financial Report Packages" { + AboutText = 'Financial Report Packages let''s you export and schedule multiple financial reports in a single file. This allows you to easily share a complete financial report package with your stakeholders.'; + AboutTitle = 'About Financial Report Packages'; AnalysisModeEnabled = false; ApplicationArea = Basic, Suite; Caption = 'Financial Report Packages'; From c72ccc5e6c3fd16df7ce63f1079d588b9fb032ca Mon Sep 17 00:00:00 2001 From: Yusheng Shu Date: Mon, 10 Aug 2026 12:06:14 +1000 Subject: [PATCH 6/7] Override export name with package name --- .../FinReportExportNameHandler.Codeunit.al | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinReportExportNameHandler.Codeunit.al b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinReportExportNameHandler.Codeunit.al index 774df665408..9f57d972685 100644 --- a/src/Layers/W1/BaseApp/Finance/FinancialReports/FinReportExportNameHandler.Codeunit.al +++ b/src/Layers/W1/BaseApp/Finance/FinancialReports/FinReportExportNameHandler.Codeunit.al @@ -21,12 +21,13 @@ codeunit 8362 FinReportExportNameHandler end; [EventSubscriber(ObjectType::Codeunit, Codeunit::ReportManagement, OnGetFilename, '', false, false)] - local procedure ReportManagement_OnGetFilename(ReportID: Integer; var Filename: Text) + local procedure ReportManagement_OnGetFilename(ReportID: Integer; var Filename: Text; var Success: Boolean) var FileMgt: Codeunit "File Management"; begin - if ReportID = Report::"Account Schedule" then + if ReportID = Report::"Account Schedule" then begin Filename := FileMgt.CreateFileNameWithExtension(OutputFilename, FileMgt.GetExtension(Filename)); - + Success := true; + end; end; } \ No newline at end of file From e641a37e377bb5c3942f0e9fb86b707d1570568b Mon Sep 17 00:00:00 2001 From: Yusheng Shu Date: Mon, 10 Aug 2026 12:08:13 +1000 Subject: [PATCH 7/7] Added uncatorgorized views to gl acc list --- .../GeneralLedger/Account/GLAccountList.Page.al | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Layers/W1/BaseApp/Finance/GeneralLedger/Account/GLAccountList.Page.al b/src/Layers/W1/BaseApp/Finance/GeneralLedger/Account/GLAccountList.Page.al index bf93faad2be..df93fda31f4 100644 --- a/src/Layers/W1/BaseApp/Finance/GeneralLedger/Account/GLAccountList.Page.al +++ b/src/Layers/W1/BaseApp/Finance/GeneralLedger/Account/GLAccountList.Page.al @@ -371,6 +371,20 @@ page 18 "G/L Account List" } } + views + { + view(Uncategorized) + { + Caption = 'Uncategorized accounts'; + Filters = where("Account Category" = const(" ")); + } + view(NoSubCategory) + { + Caption = 'Uncategorized accounts (missing sub category)'; + Filters = where("Account Subcategory Entry No." = const(0)); + } + } + trigger OnOpenPage() var PriceCalculationMgt: Codeunit "Price Calculation Mgt.";