Conditioning the output of a record to a report

I intend to make an alternate version of the Navision statement report that does not include records within the statement period that do not have a remaining amount - i.e. change the statement to only showing outstanding items.

I’ve added a new checkbox to the statement request form, and in the DtldCustLedgEntries AfterGetRecord function, I have set the PrintLine field to False when the box is checked and the remaining amount is 0. However, all lines a still printing on the report.

What should I be doing to condition the output of a record in this scenario?

Thanks in advance

What version of Navision are you using?

I would have thought you’d need the condition on the “section” of the output for it to take effect. Although not sure, as I dont know what version you are using.

Meant to say, we’re on version 3.7

So have you tried placing your conditional code on the section of the output instead of the OnAfterGetRecord trigger?!?