It is possible using the printing event After Print. The event After Print can be specified for Report, Form, Part, and Line definitions. It first prints the current interface object and then executes the specified actions for this event. A list of actions can be executed after printing the report based on some condition.
A logical UDF can be added at the voucher level and the value can be modified after print using After Print event. Based on the logical UDF value, the controls can be implemented.