In this case, the client is a regional delivery/hauling compnay. The optional field contains the driver ID. Since several "drivers" may be involved in one waybill, that is stored with the detail lines to allow distributing the amounts among the drivers.
The report takes the various revenues by driver with a detail report for each driver and a summary to enter into payroll. So I have to select on the optional field.
It looks like a job for Crystal Reports.