Ambigous problem with a setfilter

sabzamsabzam Member Posts: 1,149
Dear All,

I have created a perfectly-working report. Today I have decided to add a new set filter which is the item ledger filter. By commenting the code the report works perfectly but when removing the code it simply get stuck even though actually it is not being used.


SETRANGE("Date Filter",PeriodStartDate,PeriodStartDate[i+1] - 1);
SETFILTER("Item Ledger Filter",'Negative Adjmt.');
SETFILTER("Sales Type Filter", 'Stock');
CALCFIELDS("Sales (Qty.) - Sales TYpe", "Sales (LCY) - Sales Type", "Avg. Cost (LCY) - Sales Type");

Can anyone explaing to me this thing since I can't explain why this is happening. Please note that I have created the item ledger filter column and therefore am more than sure that it is not affecting anything.

Best Regards,

Stephen

Comments

  • krikikriki Member, Moderator Posts: 9,110
    -Did you add the field "Item Ledger Filter" to the calcformula of the different flowfields you calculate?
    -And did you add the field used in the calcformula to the index used in the underlying table to calculate the flowfield?
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • kinekine Member Posts: 12,562
    and is "Item Ledger Filter" of type Option or Code? If Option, then your usage of filter is not correct... :whistle: (do not forget to multilanguage and other things...)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.