if the job numbers are as displayed, you could create a formula like:
local stringvar aJob := {table.field};
local numbervar aDash := instr({table.field}, "-");
if aDash = 0 then
aJob
else
left(aJob, aDash - 1)
you can group on this formula, which will put all the jobs into one group.
Then you can have another group inside of this one that is by {table.field} in DESCENDING order, so the latest revision is the first record.
Since I use shared variables, while other might use running totals, I will explain what I would do...In the 'super' group header, I would set a flag, and initialize the variables to 0. In the footer of the 'normal' group, I would check the flag, if it is the first group, I would set the flag and ADD the sum of the group, if it is not the first group I would SUBTRACT the sum of the group. In the footer of the 'super' group, I would then display the value of the variable:
shared numbervar theTotal;
shared booleanvar firstFlag;
if firstFlag then (
firstFlag = false;
theTotal := theTotal + SUM({table.fieldToSum}, {table.fieldJobNumber});
else
theTotal := theTotal - SUM({table.fieldToSum}, {table.fieldJobNumber});
);
"" //hides the output
HTH