...
GlAccount3.GET("G/L Account"."No.");
GlAccount3.SETRANGE(GlAccount3."Date Filter",0D,CLOSINGDATE((AccPeriod3."Starting Date" - 1)));
IF GlobalDim1 <> '' THEN
// Delete the following lines.
GlAccount3.SETRANGE("Global Dimension 1 Filter",GlobalDim1);
IF GlobalDim2 <> '' THEN
GlAccount3.SETRANGE("Global Dimension 2 Filter",GlobalDim2);
// End of the lines.
GlAccount3.CALCFIELDS("Additional-Currency Net Change","Net Change");
IF PrintAmountsInAddCurrency THEN BEGIN
IF GlAccount3."Additional-Currency Net Change" > 0 THEN
...
...
GlAccount3.GET("G/L Account"."No.");
GlAccount3.SETRANGE(GlAccount3."Date Filter",0D,CLOSINGDATE((AccPeriod3."Starting Date" - 1)));
IF GlobalDim1 <> '' THEN
// Add the following lines.
GlAccount3.SETFILTER("Global Dimension 1 Filter",GlobalDim1);
IF GlobalDim2 <> '' THEN
GlAccount3.SETFILTER("Global Dimension 2 Filter",GlobalDim2);
// End of the lines.
GlAccount3.CALCFIELDS("Additional-Currency Net Change","Net Change");
IF PrintAmountsInAddCurrency THEN BEGIN
IF GlAccount3."Additional-Currency Net Change" > 0 THEN
...