Hi Matthew,
Try this please:
1) Create a formula with this code and place this on the Details:
shared stringvar barcode;
shared numbervar grand;
if Instr(barcode, {Barcode_field}) = 0 then
(
barcode := barcode + {Barcode_field} + ',';
grand := grand + {field_to_sum};
);
2) Create a display formula and place this on the Report Footer to display the Grand Total:
shared numbervar grand;
-Abhilash