bab said:
sample of the report to be :
Degits values
51 3201
61 9703 the sum of 2 digits = 12904
5132 444
5133 2757
6111 9703 the sum of 4 digits = 12904
This's going to be the result. So if the "Group" required,
the two and the four would be sorted 51, 5132, 5133 then
61, 6111.
I am still not clear on what you're trying to do, but I
continue to think that you do need to group on something.
Maybe the grouping can be done in the query, but I think
that will be needed to calculate the Sum. We can worry
about what line the sum is on after everything else is
working.
Try setting the report's Sorting and Grouping to Group on
the expression:
=Len(CStr(Digits))
with footer section. Place a text box the expression
=Sum(values) in the group footer.
Set the second line in the Sorting and Grouping to just sort
(no header or footer) on the field Digits.
If you do that, I expect the report to produce the result:
Degits values
51 3201
61 9703
the sum of 2 digits = 12904
5132 444
5133 2757
6111 9703
the sum of 4 digits = 12904
which I think is very close to what you want.