Neftali, perfecto, ya solucionado, solo tuve que añadirle una linea (el primer subitem de cada item a ''), muchisimas gracias compañero
pongo una imagen del resultado
Código Delphi
[-]procedure TForm1.MonthCalendar1Click(Sender: TObject);
var Item: TListItem;
Contador:Integer;
Hora:string;
begin
Label1.Caption:=DateToStr(MonthCalendar1.Date);
LV.Clear;
LV.GroupView := True;
LV.GridLines := True;
Contador:=0;
Hora:='';
ActQuery(IBQcitas,'Select * From CITAS WHERE FECHA='+QuotedStr(Cambiafecha(MonthCalendar1.Date)));
if IBQcitas.IsEmpty=false then
begin
IBQcitas.First;
if not (IBQcitas.IsEmpty) then
begin
Hora:=FormatDateTime('t',StrToDateTime(IBQcitasHORA.AsString));
LV.Groups.Add;
LV.Groups.Items[Contador].GroupID:=Contador;
LV.Groups.Items[Contador].Header := Hora;
Contador:=contador+1;
end;
while not IBQcitas.Eof do
begin
if hora<>FormatDateTime('t',StrToDateTime(IBQcitasHORA.AsString)) then
begin
LV.Groups.Items[Contador-1].Footer :='Fin hora:[ '+ Hora+' ]';
Hora:=FormatDateTime('t',StrToDateTime(IBQcitasHORA.AsString));
LV.Groups.Add;
LV.Groups.Items[Contador].GroupID:=Contador;
LV.Groups.Items[Contador].Header := Hora;
Contador:=contador+1;
end;
item:=LV.Items.Add;
Item.GroupID:=Contador-1;
item.SubItems.add('');
item.SubItems.add(IBQcitasOPERARIO.AsString);
item.SubItems.add(IBQcitasCLIENTE.AsString);
item.SubItems.add(IBQcitasTRABAJO.AsString);
IBQcitas.Next;
end;
if not (IBQcitas.IsEmpty) then LV.Groups.Items[Contador-1].Footer :='Fin hora:[ '+ Hora+' ]';
end;
end;