am making a report to sum the total of AmountIncVAT value from the Sales Invoice Table.
In the Sales Invoice Table, I want to Sum for entries related to 'Customer1' and 'Customer2'.
So the Sum of all the entries of Customer1 and Customer2 will be printed on the report.
I successfully did for Customer1 by the following method. (It might be the wrong approach to start with hence I am here seeking help)
OnPreDataItem of my report I wrote
"Sales Invoice Line".SETFILTER("Sell-to Customer No.",'Customer1');
"Sales Invoice Line".FINDSET;
Note my dataitem of the report just has Sales Invoice Line and a couple of its fields including the AmountIncVAT
In the Layout, I add a table, add AmountIncVAT, beneath Sum it and hide the row where the rows will be printed and let the Sum row visible. All good.
How do I know put another filter to filter "Sales Invoice Line".SETFILTER("Sell-to Customer No.",'Customer2'); and have another table with the same Sum of Customer2 in it?