...
IF NOT PrintGLDetails THEN
// Delete the following line.
CurrReport.BREAK;
...
...
IF NOT PrintGLDetails THEN
// Add the following lines.
CurrReport.BREAK
ELSE BEGIN
DtldVendLedgEntry.RESET;
DtldVendLedgEntry.SETRANGE("Vendor Ledger Entry No.","Vendor Ledger Entry"."Entry No.");
DtldVendLedgEntry.SETFILTER("Entry Type",'<>%1',DtldVendLedgEntry."Entry Type"::Application);
IF DtldVendLedgEntry.FINDSET THEN BEGIN
TransactionNoFilter := FORMAT(DtldVendLedgEntry."Transaction No.");
WHILE DtldVendLedgEntry.NEXT <>0 DO
TransactionNoFilter := TransactionNoFilter + '|' + FORMAT(DtldVendLedgEntry."Transaction No.");
END;
SETFILTER("Transaction No.",TransactionNoFilter);
END;
DtldCustLedgEntry.RESET;
DtldCustLedgEntry.SETRANGE("Cust. Ledger Entry No.","Cust. Ledger Entry"."Entry No.");
DtldCustLedgEntry.SETFILTER("Entry Type",'<>%1',DtldCustLedgEntry."Entry Type"::Application);
IF DtldCustLedgEntry.FINDSET THEN BEGIN
TransactionNoFilter := FORMAT(DtldCustLedgEntry."Transaction No.");
WHILE DtldCustLedgEntry.NEXT <>0 DO
TransactionNoFilter := TransactionNoFilter + '|' + FORMAT(DtldCustLedgEntry."Transaction No.");
END;
SETFILTER("Transaction No.",TransactionNoFilter);
END;
// End of the added lines.
...