Hola, muchas gracias a todos por su ayuda, pero sigo sin poder hacer que funcione.
Este es el código que uso (al compilar no aparece ningún error), espero que puedan ayudarme a encontrar el problema.
Código Delphi
[-] Try
QuickReport1:=TQuickReport1.Create(self);
QuickReport1.ADOQuery1.SQL.Add('select tablaA.ta_fecha');
QuickReport1.ADOQuery1.SQL.Add('tablaA.ta_total-(tablaA.ta_total * tablaB.tb_porcentaje/100) as descuento');
QuickReport1.ADOQuery1.SQL.Add('from tablaA, tablaB');
QuickReport1.ADOQuery1.SQL.Add('where tablaA.ta_descuento = tablaB.tb_id');
QuickReport1.ADOQuery1.SQL.Add('and ta_fecha between'+QuotedStr(FormatDateTime('yyyy/mm/dd',DateTimePicker1.Date))
+'AND'+QuotedStr(FormatDateTime('yyyy/mm/dd',DateTimePicker2.Date)));
QuickReport1.ADOQuery1.Open;
QuickReport1.QRDBText1.DataField:='ta_fecha';
QuickReport1.QRDBText2.DataField:='descuento';
QuickReport1.Preview;
finally
QuickReport1.Free;
end;
Gracias.