COPYFILTER on Report

Hi I have prepared a report for Inventory. It uses Item and Item Variant tables. Filters are used on Item table. Now I want to copy 2 filters from Item filters to Item Variant. “Date Filter” and “Location Filter”. I tried using COPYFILTER on PreDataItem() on Item Variant DataItem but it didn’t work. So I tried on DataItem “Item Varaint” properties, DataItemLink as "Item No.=FIELD(No.),Date Filter=FIELD(Date Filter),Location Filter=FIELD(Location Filter). It worked very well. Is this the correct way to do this or should I be using COPYFILTER to copy the filter?

I think the less code you have to use, the better. So, if a specific property correctly solves a problem, no need to code anything.

This works fine and is the proposed way to do it. The programmatic way would be: Rec1.SETFILTER(Field,Rec.GETFILTER(Field));