Table filtering for unique secondary keys on a Report.

OK how about attacking this from a different angle. Have a report with a Job DataItem and then process job ledger entries from that instead (combined with the Phase table).

ph As Phase rec
jle As Job Ledger Entry rec

Job - OnAfterGetRecord()

ph.RESET;
NoOfPh := ph.COUNT;
ph.FIND(’-’);
repeat
jle.RESET;
jle.SETCURRENTKEY(jle.“Job No.”, jle.“Phase Code”, jle.“Entry No.”);
jle.SETRANGE(“Job No.”, Job.“No.”);
jle.SETRANGE(jle.“Phase Code”, ph.Code);
IF jle.FIND(’-’) THEN
//repeat
MESSAGE(’%1 ; %2’, jle.“Job No.”, jle.“Phase Code”);
//until jle.NEXT = 0;
until ph.NEXT = 0;

Is this what you wanted?