I am trying to build a report with totals within a range. Below is the code am using:
Cont.SETRANGE("Employee No.",Empid);
Cont.SETRANGE("From Date","Period Start","Period End");
Cont.SETFILTER("From Date",'>=%1',"Period Start");
Cont.SETFILTER("To Date",'<=%1',"Period End");
IF Cont.FIND('-')
THEN BEGIN
TotalAmount += Cont.Quantity;
END;
Now when I run the report I am only getting one of the Amounts in the range and not the total.
Any ideas how to get the total of all occurring Amounts within the range please!
Few years ago we were not existing and few years to come we would be in the grave! So what will benefit us in the grave?
0
Answers
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
http://www.mibuso.com/forum/viewtopic.php?t=4368&highlight=sum+records