DavidW said:
how does grouping work?
this is the first time I have used grouping in reports, my results of what I
did were not desirable!
how would you sort/group what was disscussed earlier?
In the Sorting and Grouping window, under the
Field/Expression heading, select whatever field from the
report's record source contains the values "onroad" or
"offroad" .
This means that you want to sort by the values in that
field. In other words, you want all the offroad details
together and all the onroad details together.
If you also go down to the list of properties in the bottom
section of the Sorting and Grouping window, you can enter
Yes in the Header property. This will create a group header
section where you can place labels, text boxes, and other
controls to display values specific to the group (i.e.
values that are the same for all the details in the group).
You could also create a group footer section for similar
values that you might want to appear after the details.
One important feature of group headers and footers is that
you can use a text box with an aggregate funtion to display
a group total. E.g. a text box with the expression
=Count(*) will display the number of details in the group,
or another text box could use the expression
=Sum(gallonsfieldname) to display the total gallons in the
group. It is very important to keep the terminology
straight here, a field is a column in a table or query,
while a control (e.g. text box) is a tool that displays
values on the report. The aggregate functions only know
about fields, they are unaware of controls. so keep the
names straight.