COPYFILTER problem

mkpjsr
mkpjsr Member Posts: 587
Hi all,

Can anybody give me some input on COPYFILTER function.
Actually i want to apply filter of one data item to another data item so where i should place the code having COPYFILTER so that the filter is applied on both data items.
the data items are not indented.

Answers

  • kriki
    kriki Member, Moderator Posts: 9,121
    You can do that in the OnPreReport-trigger
    "Table 1".COPYFILTERS("Table 2");
    
    But this only works if both tables are the same.

    Otherwise, you have to do field-per-field.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • kine
    kine Member Posts: 12,562
    I am not sure that it will help in onprereport - I though that the filters are reset again in OnPreDataItem... But you can read the filters in OnPreReport and set them in OnPreDataItem...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • mkpjsr
    mkpjsr Member Posts: 587
    kine wrote:
    I am not sure that it will help in onprereport - I though that the filters are reset again in OnPreDataItem... But you can read the filters in OnPreReport and set them in OnPreDataItem...

    THANX, Its working.
  • David_Singleton
    David_Singleton Member Posts: 5,479
    kine wrote:
    I am not sure that it will help in onprereport - I though that the filters are reset again in OnPreDataItem... But you can read the filters in OnPreReport and set them in OnPreDataItem...


    That's my understanding also.
    David Singleton