Hi There,
Wonder if you could help, I am writing a report and wish to calculate the sum of values within a date range for a period of time for example
January February March April
2000 9088 43434 4555
The above is an example of the report layout and the values shown beneath the headings will come from same table, so the question is how do I calculate the values as shown from the same table.
Thanks
Comments
2. How to calculate. Define a decimal array. (dcMonthSum). Use it as source expression in One Body Section field (dcMonthSum[1] .. dcMonthSum[12]).
In OnAfterGetRecord Calculate all 12 sums.
Remember! The table you use as source to calculate monthly sums should not be used as data item.
Think the data item as one dimension of report (vertical), months as second dimension of report (horizontal) and the data that is used for sums is defined as global record.
For example. To show monthly sales for each customers, set the Data Item = Customer (Vertical Dim), months would be horizontal dimension and "Customer Ledger Entry" is the global that you use for summing dcMonthSum[1] .. dcMonthSum[12].
If you need to know how to accomplish summing, just ask...
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯