Al final lo he solucionado así .
en IndexName hago un indice por Cliente y Obra.
Luego como tengo filtrado los campos ha insertar .
hago algo así :
Supongamos que el ClientDataSet para el ejemplo Client
Código Delphi
[-]
type
miregistro = record
campo1 : string;
campo2 :integer;
....
end;
while not Client.eof do
begin
Cliente := ClientCliente.AsInteger;
Obra := ClientObra.AsInteger;
while ClientCliente.AsInteger = Cliente and ClientObra.AsInteger = Obra do
begin
if miregistro.campo1 = '' then
begin
end;
Client.Next;
end;
end;
Más o menos , este es la manera del código , que funciona , pero la lastima es cuando haces un indexname = 'miIndice' y te lo ordena como si fuera más o menos un group by , no sepa de una propiedad , un valor integer para cada grupo de valores .
Un saludo