Report Writer

Hello I have a report with three levels of data items as follows Customer Item Category Item In the OnAfterGetRecord of Item I set a filter, along the lines as follows Table.SETRANGE(Field,Value), I then want to say that if as a result of this filter there are no records then skip, please con firm the expression I need to use, I have tried If Table.FIND(’-’) THEN CurrReport.SKIP but this then seems to skip all output. Cheers

First of all, set that filters on the OnPreDataItem. Second since you put this filter on the OnPredataItem, Report will skip automatically if it did not find any records. Naveen Jain

There is a property on the first dataitem you can set called PrintOnlyIfDetail

quote:


Originally posted by chucky
Hello I have a report with three levels of data items as follows Customer Item Category Item In the OnAfterGetRecord of Item I set a filter, along the lines as follows Table.SETRANGE(Field,Value), I then want to say that if as a result of this filter there are no records then skip, please con firm the expression I need to use, I have tried If Table.FIND(‘-’) THEN CurrReport.SKIP but this then seems to skip all output. Cheers


Skip if no record for which data item? Customer? Item Category? Or Item? If these data items are linked, then the solution SM posted will work.