Ver Mensaje Individual
  #13  
Antiguo 16-08-2013
Avatar de José Luis Garcí
[José Luis Garcí] José Luis Garcí is offline
Miembro Premium
 
Registrado: may 2003
Ubicación: Las Palmas de G.C.
Posts: 1.372
Reputación: 23
José Luis Garcí Va camino a la fama
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(IBQcitasHORA.AsString);
      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;
__________________
Un saludo desde Canarias, "El abuelo Cebolleta"

Última edición por José Luis Garcí fecha: 16-08-2013 a las 14:24:55.
Responder Con Cita