Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 16 May 2016 at 4:05am
The only way I can think you can do it (never tried) is to make a formula that does a modulo on the rowcount, but still need to figure how to designate a group (manual running total?!?).
You can do it by using a shared variable as a counter and a formula that defines an interval of N records (20 in your case). Then you can group on this formula and modify the group in order to show a group name like "1 - 20", "21- 40", and so on. You can insert a summary to get the sum, average, etc. on each group. Follow these steps:
- Create a formula named "IntervalNumber". Use this code (CR syntax):
Global NumberVar Counter;
Local NumberVar Result;
Result := 1 + ((Counter )\20) + {Table.NumericField} * 0;
Counter := Counter + 1;
Result
Replace {Table.NumericField} by any numeric field in your table. This field is necessary to avoid an error when previewing the report.
- Create a group based on the @IntervalNumber formula. Change Group Options; select "Use formula as Group Name", click the "x+2" icon beside this option and type this code in the formula editor:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum