Report Filter

Hi! I have a report that prints the result of this: DataItemTableView: WHERE(FieldOne=FILTER(’’),FieldTwo=FILTER(’’),FieldThree=FILTER(<>’’),FieldFour=FILTER(’’)) How can I do this in C/AL code instead of writing this under DataItemTableView? I guess I must use some kind of filters. Hope someone can help me out.

In OnPreDataItem: SETRANGE(FieldOne, ‘’); SETRANGE(FieldTwo, ‘’); SETFILTER(FieldThree, ‘<>%1’, ‘’); SETRANGE(FieldFour, ‘’);

Sorry I forgot to mention that one of the fields is a Date field. FieldTwo=FILTER(’’) is a datefield. I got an error that says I can’t Typeconvert Date:=Text

In that case: SETRANGE(FieldTwo,0D);

Great, thanks a lot for helping me out so quick :slight_smile: