Report / if XX show field1 else field2

Hello, i need some help. On a Report i would like to change automatically that field1 or field 2 is shown. For example: If Customer.CustomerClassification >3 then show field1 else show field2 I don´t know how to tell the report to do that?!? Thx Michael

make two bodies first with field1 second with field2 then in the OnPreSection of bodie1: currreport.showoutput(condition=true) then in the OnPreSection of bodie2: currreport.showoutput(condition=false)

Thanks for the info. That´s it. kind regards Michael

An alternative solution (if you have report bodies with a lot of fields and only a single “variant”) would be to use some global variable which is assigned from field1 or field2 in the OnAfterGetRecord or OnPreSection trigger. Then you can create only a single body and show the variable instead of the fields. If the fields are of different data types, use a Text variable and assign it FORMAT(field1) or FORMAT(field2) - the user will not notice the difference [;)]