The coding was present, I just used the existing account schedule report and saved as a new report for the summary.
Documentation()
OnInitReport()
OnPreReport()
TransferValues;
UpdateFilters;
InitAccSched;
OnPostReport()
AccScheduleName - OnPreDataItem()
SETRANGE(Name,AccSchedName);
PageGroupNo := 1;
NextPageGroupNo := 1;
AccScheduleName - OnAfterGetRecord()
CurrReport.PAGENO := 1;
GLSetup.GET;
IF "Analysis View Name" <> '' THEN BEGIN
AnalysisView.GET("Analysis View Name");
END ELSE BEGIN
AnalysisView.INIT;
AnalysisView."Dimension 1 Code" := GLSetup."Global Dimension 1 Code";
AnalysisView."Dimension 2 Code" := GLSetup."Global Dimension 2 Code";
END;
IF UseAmtsInAddCurr THEN
HeaderText := STRSUBSTNO(Text003,GLSetup."Additional Reporting Currency")
ELSE
IF GLSetup."LCY Code" <> '' THEN
HeaderText := STRSUBSTNO(Text003,GLSetup."LCY Code")
ELSE
HeaderText := '';
AccScheduleName - OnPostDataItem()
Heading - OnPreDataItem()
Heading - OnAfterGetRecord()
Heading - OnPostDataItem()
AccSchedLineSpec - OnPreDataItem()
IF NOT ShowAccSchedSetup THEN
CurrReport.BREAK;
NextPageGroupNo += 1;
AccSchedLineSpec - OnAfterGetRecord()
IF "Row No." <> '' THEN
LineShadowed := NOT LineShadowed
ELSE
LineShadowed := FALSE;
AccSchedLineSpec - OnPostDataItem()
PageBreak - OnPreDataItem()
IF NOT ShowAccSchedSetup THEN
CurrReport.BREAK;
PageBreak - OnAfterGetRecord()
CurrReport.NEWPAGE;
PageBreak - OnPostDataItem()
Acc. Schedule Line - OnPreDataItem()
PageGroupNo := NextPageGroupNo;
SETFILTER("Date Filter",DateFilter);
SETFILTER("G/L Budget Filter",GLBudgetFilter);
SETFILTER("Cost Budget Filter",CostBudgetFilter);
SETFILTER("Business Unit Filter",BusinessUnitFilter);
SETFILTER("Dimension 1 Filter",Dim1Filter);
SETFILTER("Dimension 2 Filter",Dim2Filter);
SETFILTER("Dimension 3 Filter",Dim3Filter);
SETFILTER("Dimension 4 Filter",Dim4Filter);
SETFILTER("Cost Center Filter",CostCenterFilter);
SETFILTER("Cost Object Filter",CostObjectFilter);
SETFILTER("Cash Flow Forecast Filter",CashFlowFilter);
Acc. Schedule Line - OnAfterGetRecord()
IF (Show = Show::No) OR NOT ShowLine(Bold,Italic) THEN
CurrReport.SKIP;
Bold_control := Bold;
Italic_control := Italic;
Underline_control := Underline;
DoubleUnderline_control := "Double Underline";
PageGroupNo := NextPageGroupNo;
IF "New Page" THEN
NextPageGroupNo := PageGroupNo + 1;
IF "Row No." <> '' THEN
LineShadowed := NOT LineShadowed
ELSE
LineShadowed := FALSE;
Acc. Schedule Line - OnPostDataItem()
Column Layout - OnPreDataItem()
SETRANGE("Column Layout Name",ColumnLayoutName);
LineSkipped := TRUE;
Column Layout - OnAfterGetRecord()
IF Show = Show::Never THEN
CurrReport.SKIP;
Header := "Column Header";
RoundingHeader := '';
IF "Rounding Factor" IN ["Rounding Factor"::"1000","Rounding Factor"::"1000000"] THEN
CASE "Rounding Factor" OF
"Rounding Factor"::"1000":
RoundingHeader := Text000;
"Rounding Factor"::"1000000":
RoundingHeader := Text001;
END;
ColumnValuesAsText := '';
ColumnValuesDisplayed := AccSchedManagement.CalcCell("Acc. Schedule Line","Column Layout",UseAmtsInAddCurr);
IF AccSchedManagement.GetDivisionError THEN BEGIN
IF ShowError IN [ShowError::"Division by Zero",ShowError::Both] THEN
ColumnValuesAsText := Text002;
END ELSE
IF AccSchedManagement.GetPeriodError THEN BEGIN
IF ShowError IN [ShowError::"Period Error",ShowError::Both] THEN
ColumnValuesAsText := Text004;
END ELSE BEGIN
ColumnValuesAsText :=
AccSchedManagement.FormatCellAsText("Column Layout",ColumnValuesDisplayed);
IF "Acc. Schedule Line"."Totaling Type" = "Acc. Schedule Line"."Totaling Type"::Formula THEN
CASE "Acc. Schedule Line".Show OF
"Acc. Schedule Line".Show::"When Positive Balance":
IF ColumnValuesDisplayed < 0 THEN
ColumnValuesAsText := '';
"Acc. Schedule Line".Show::"When Negative Balance":
IF ColumnValuesDisplayed > 0 THEN
ColumnValuesAsText := '';
"Acc. Schedule Line".Show::"If Any Column Not Zero":
IF ColumnValuesDisplayed = 0 THEN
ColumnValuesAsText := '';
END;
END;
IF (ColumnValuesAsText <> '') OR ("Acc. Schedule Line".Show = "Acc. Schedule Line".Show::Yes) THEN
LineSkipped := FALSE;
Column Layout - OnPostDataItem()
IF LineSkipped THEN
LineShadowed := NOT LineShadowed;
InitAccSched()
AccScheduleName.SETRANGE(Name,AccSchedName);
"Acc. Schedule Line".SETFILTER("Date Filter",DateFilter);
"Acc. Schedule Line".SETFILTER("G/L Budget Filter",GLBudgetFilter);
"Acc. Schedule Line".SETFILTER("Cost Budget Filter",CostBudgetFilter);
"Acc. Schedule Line".SETFILTER("Business Unit Filter",BusinessUnitFilter);
"Acc. Schedule Line".SETFILTER("Dimension 1 Filter",Dim1Filter);
"Acc. Schedule Line".SETFILTER("Dimension 2 Filter",Dim2Filter);
"Acc. Schedule Line".SETFILTER("Dimension 3 Filter",Dim3Filter);
"Acc. Schedule Line".SETFILTER("Dimension 4 Filter",Dim4Filter);
"Acc. Schedule Line".SETFILTER("Cost Center Filter",CostCenterFilter);
"Acc. Schedule Line".SETFILTER("Cost Object Filter",CostObjectFilter);
"Acc. Schedule Line".SETFILTER("Cash Flow Forecast Filter",CashFlowFilter);
EndDate := "Acc. Schedule Line".GETRANGEMAX("Date Filter");
FiscalStartDate := AccSchedManagement.FindFiscalYear(EndDate);
AccSchedLineFilter := "Acc. Schedule Line".GETFILTERS;
PeriodText := "Acc. Schedule Line".GETFILTER("Date Filter");
SetAccSchedName(NewAccSchedName : Code[10])
AccSchedNameHidden := NewAccSchedName;
SetColumnLayoutName(ColLayoutName : Code[10])
ColumnLayoutNameHidden := ColLayoutName;
SetFilters(NewDateFilter : Text[30];NewBudgetFilter : Text[30];NewCostBudgetFilter : Text[30];NewBusUnitFilter : Text[30];NewDim1Filter : Text[250];NewDim2Filter : Text[250];NewDim3Filter : Text[250];NewDim4Filter : Text[250])
DateFilterHidden := NewDateFilter;
GLBudgetFilterHidden := NewBudgetFilter;
CostBudgetFilterHidden := NewCostBudgetFilter;
BusinessUnitFilterHidden := NewBusUnitFilter;
Dim1FilterHidden := NewDim1Filter;
Dim2FilterHidden := NewDim2Filter;
Dim3FilterHidden := NewDim3Filter;
Dim4FilterHidden := NewDim4Filter;
UseHiddenFilters := TRUE;
ShowLine(Bold : Boolean;Italic : Boolean) : Boolean
IF "Acc. Schedule Line"."Totaling Type" = "Acc. Schedule Line"."Totaling Type"::"Set Base For Percent" THEN
EXIT(FALSE);
IF "Acc. Schedule Line".Show = "Acc. Schedule Line".Show::No THEN
EXIT(FALSE);
IF "Acc. Schedule Line".Bold <> Bold THEN
EXIT(FALSE);
IF "Acc. Schedule Line".Italic <> Italic THEN
EXIT(FALSE);
EXIT(TRUE);
LOCAL FormLookUpDimFilter(Dim : Code[20];VAR Text : Text[1024]) : Boolean
IF Dim = '' THEN
EXIT(FALSE);
DimValList.LOOKUPMODE(TRUE);
DimVal.SETRANGE("Dimension Code",Dim);
DimValList.SETTABLEVIEW(DimVal);
IF DimValList.RUNMODAL = ACTION::LookupOK THEN BEGIN
DimValList.GETRECORD(DimVal);
Text := DimValList.GetSelectionFilter;
EXIT(TRUE);
END;
EXIT(FALSE)
LOCAL FormGetCaptionClass(DimNo : Integer) : Text[250]
CASE DimNo OF
1:
BEGIN
IF AnalysisView."Dimension 1 Code" <> '' THEN
EXIT('1,6,' + AnalysisView."Dimension 1 Code");
EXIT(STRSUBSTNO(Text005,DimNo));
END;
2:
BEGIN
IF AnalysisView."Dimension 2 Code" <> '' THEN
EXIT('1,6,' + AnalysisView."Dimension 2 Code");
EXIT(STRSUBSTNO(Text005,DimNo));
END;
3:
BEGIN
IF AnalysisView."Dimension 3 Code" <> '' THEN
EXIT('1,6,' + AnalysisView."Dimension 3 Code");
EXIT(STRSUBSTNO(Text005,DimNo));
END;
4:
BEGIN
IF AnalysisView."Dimension 4 Code" <> '' THEN
EXIT('1,6,' + AnalysisView."Dimension 4 Code");
EXIT(STRSUBSTNO(Text005,DimNo));
END;
END;
LOCAL TransferValues()
GLSetup.GET;
IF AccSchedNameHidden <> '' THEN
AccSchedName := AccSchedNameHidden;
IF ColumnLayoutNameHidden <> '' THEN
ColumnLayoutName := ColumnLayoutNameHidden;
IF DateFilterHidden <> '' THEN
DateFilter := DateFilterHidden;
IF GLBudgetFilterHidden <> '' THEN
GLBudgetFilter := GLBudgetFilterHidden;
IF CostBudgetFilterHidden <> '' THEN
CostBudgetFilter := CostBudgetFilterHidden;
IF BusinessUnitFilterHidden <> '' THEN
BusinessUnitFilter := BusinessUnitFilterHidden;
IF Dim1FilterHidden <> '' THEN
Dim1Filter := Dim1FilterHidden;
IF Dim2FilterHidden <> '' THEN
Dim2Filter := Dim2FilterHidden;
IF Dim3FilterHidden <> '' THEN
Dim3Filter := Dim3FilterHidden;
IF Dim4FilterHidden <> '' THEN
Dim4Filter := Dim4FilterHidden;
IF AccSchedName <> '' THEN
IF NOT AccScheduleName.GET(AccSchedName) THEN
AccSchedName := '';
IF AccSchedName = '' THEN
IF AccScheduleName.FINDFIRST THEN
AccSchedName := AccScheduleName.Name;
IF ColumnLayoutName <> '' THEN
IF NOT ColumnLayoutName2.GET(ColumnLayoutName) THEN
ColumnLayoutName := AccScheduleName."Default Column Layout";
IF AccScheduleName."Analysis View Name" <> '' THEN
AnalysisView.GET(AccScheduleName."Analysis View Name")
ELSE BEGIN
AnalysisView."Dimension 1 Code" := GLSetup."Global Dimension 1 Code";
AnalysisView."Dimension 2 Code" := GLSetup."Global Dimension 2 Code";
END;
LOCAL UpdateFilters()
IF UseHiddenFilters THEN BEGIN
DateFilter := DateFilterHidden;
GLBudgetFilter := GLBudgetFilterHidden;
CostBudgetFilter := CostBudgetFilterHidden;
BusinessUnitFilter := BusinessUnitFilterHidden;
Dim1Filter := Dim1FilterHidden;
Dim2Filter := Dim2FilterHidden;
Dim3Filter := Dim3FilterHidden;
Dim4Filter := Dim4FilterHidden;
END;
IF ColumnLayoutName = '' THEN
IF AccScheduleName.FINDFIRST THEN
ColumnLayoutName := AccScheduleName."Default Column Layout";
ValidateAccSchedName()
AccSchedManagement.CheckName(AccSchedName);
AccScheduleName.GET(AccSchedName);
IF AccScheduleName."Default Column Layout" <> '' THEN
ColumnLayoutName := AccScheduleName."Default Column Layout";
IF AccScheduleName."Analysis View Name" <> '' THEN
AnalysisView.GET(AccScheduleName."Analysis View Name")
ELSE BEGIN
CLEAR(AnalysisView);
AnalysisView."Dimension 1 Code" := GLSetup."Global Dimension 1 Code";
AnalysisView."Dimension 2 Code" := GLSetup."Global Dimension 2 Code";
END;
Dim1FilterEnable := AnalysisView."Dimension 1 Code" <> '';
Dim2FilterEnable := AnalysisView."Dimension 2 Code" <> '';
Dim3FilterEnable := AnalysisView."Dimension 3 Code" <> '';
Dim4FilterEnable := AnalysisView."Dimension 4 Code" <> '';