Ver Mensaje Individual
  #8  
Antiguo 10-10-2003
Jose_Pérez Jose_Pérez is offline
Miembro
 
Registrado: may 2003
Posts: 156
Reputación: 24
Jose_Pérez Va por buen camino
He probado de dos maneras: Incluyendo el objeto TQuickReport en el formulario desde donde ordeno el listado, o en otro TForm, que cargo dinámicamente. En ambos casos falla!!!.

Esto es lo que hago.

Código:
  For Contador:=Low(Agencias) To High(Agencias) Do
      Begin

      Ficha:=TfrmQRFactProvE.Create(Self);

      With Ficha.Query Do
           Begin
           Close;
           SQL.Clear;
           Consulta:='Select * from Linvales Where   ˇAgc_lval='+IntToStr(Agencias[Contador])+
                     ' And extract(month from Fec_lval)='+IntToStr(cboMes.ItemIndex+1)+
                     ' And extract(year from Fec_lval)='+IntToStr(cboYear.ItemIndex+1990)+
                     ' And fac_lval=0 Order by Num_lval';
           SQL.Add(Consulta);
           Open;
 
           End;

      If Not cbxPantalla.Checked Then
         Ficha.QuickReport.Print
         else
         Ficha.QuickReport.Preview;
      Ficha.QuickReport.Dataset:=Nil;   
      Ficha.Free;
      Application.ProcessMessages;
      End;
Responder Con Cita