Group Rows by Subtotal or Count

R

Rskinner4

Have a report that has 97 rows and I want to "Subtotal" the Count of Rows to
30, so I would end up with three "groups" of 30 and one "group" of 7.
However, all the group, sort, and totals are by field or names. Once I have
them in Groups of 30, I want the Subtotal amount for that group. How do I
create this Subtotal Count in the Field Footer of the Report? Thanks.
 
M

Marshall Barton

Rskinner4 said:
Have a report that has 97 rows and I want to "Subtotal" the Count of Rows to
30, so I would end up with three "groups" of 30 and one "group" of 7.
However, all the group, sort, and totals are by field or names. Once I have
them in Groups of 30, I want the Subtotal amount for that group. How do I
create this Subtotal Count in the Field Footer of the Report?

To do grouping on a linenumber kind of thing, the line
number nust be a field ib the report's record source query.

If you have a way to sort the records, then you can use a
subquery in a calculated field to do it:

LineNum: (SELECT Count(*) FROM table As X WHERE X.sortfield
< table.sortfield)

Then the report can group on the expression:
=LineNumber \ 30
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top