Hi All,
I am in a scenario where I need to filter data in a report for a specific integer values/Dateformula using C/AL code. The idea is that for a specific item classification and the value which are specified in the if statement should only the report display the result. Thanks in advance.
Here is a snippet of the code
On AfterGetRecord
DiffDate := FirstD - SecondD;
DivDate :=ROUND(DiffDate/30,1,'<');
StrCon :=FORMAT(DivDate)+Text006;
EVALUATE(SLOBWindowsPeriod,FORMAT(StrCon));
IF DivDate >=12 THEN
Item.SETFILTER(Item."Classification Code",'CON')
ELSE IF DivDate >=24 THEN
Item.SETFILTER(Item."Classification Code",'OPS')
ELSE IF DivDate >=48 THEN
Item.SETFILTER(Item."Classification Code",'INS')
// The above code is supposed to filter data for
//the specific Item classification based on the if statement
// but it didnit give the required results
*This post is locked for comments
I have the same question (0)