Hey guys!
I have a scenario in which i want to display Sales for each day.
On any specific day, there can be 1 or more then 1 sales.
I thus need to show the SUM of sales on that particular date too.
What i did was, i arranged the result on ireport as Grouped by on Date.
But, i am confused as how would i show the total for each date.
I would sure appreciate any help.
I have a scenario in which i want to display Sales for each day.
On any specific day, there can be 1 or more then 1 sales.
I thus need to show the SUM of sales on that particular date too.
What i did was, i arranged the result on ireport as Grouped by on Date.
But, i am confused as how would i show the total for each date.
I would sure appreciate any help.
3 Answers:
Posted on April 28, 2008 at 4:04pm
In iReport you can create a variable with the calculation type sum on the sales field.
The reset type of your variable should be "Group" and the reset group should be "Date". Now your variable sum will reset each time the group changes.
Finally you can write out this variable in the footer of the "Date" group to display the group sum before the reset.
One note, ensure you data is sorted (can be done in with the JR sorting option, or in the SQL if your report has an SQL query) by date field to ensure the grouping is inclusive across your data.
HTH
The reset type of your variable should be "Group" and the reset group should be "Date". Now your variable sum will reset each time the group changes.
Finally you can write out this variable in the footer of the "Date" group to display the group sum before the reset.
One note, ensure you data is sorted (can be done in with the JR sorting option, or in the SQL if your report has an SQL query) by date field to ensure the grouping is inclusive across your data.
HTH