Ver Mensaje Individual
  #4  
Antiguo 09-12-2011
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola Lucas.

Proba de este modo:
Código Delphi [-]
 ...
 with QuickReport1.ADOQuery1 do
  begin
    Close;
    SQL.Clear;
    SQL.Add('select tablaA.ta_fecha,');
    SQL.Add('tablaA.ta_total-(tablaA.ta_total * TablaB.Dcto/100) as descuento ');
    SQL.Add('from tablaA, tablaB ');
    SQL.Add('where tablaA.ta_descuento = tablaB.ID');
    SQL.Add('and ta_fecha between :DESDE and :HASTA');
    Parameters.ParamByName('DESDE').Value:= DateTimePicker1.Date;
    Parameters.ParamByName('HASTA').Value:=DateTimePicker2.Date;
    Open;
  end;
  QuickReport1.QRDBText1.DataSet:= ADOQuery1;
  QuickReport1.QRDBText1.DataField:= 'descuento';
  ...

Saludos.
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....
Responder Con Cita