Ver Mensaje Individual
  #4  
Antiguo 15-12-2010
Avatar de microbiano
microbiano microbiano is offline
Miembro
 
Registrado: sep 2008
Ubicación: Mexico D.F
Posts: 349
Reputación: 16
microbiano Va por buen camino
prueba

Código Delphi [-]
qry_ventas.SQL.Add('SELECT FACTURA.Idfactura, FACTURA.nofactura, FACTURA.Fecha,');
    qry_ventas.SQL.Add('FACTURA.CodCliente, clientes.RAZON_SOCIAL, FACTURA.Terminos,');
    qry_ventas.SQL.Add('FACTURA.CodVendedor, FACTURA.montosubtotal, FACTURA.descuento,');
    qry_ventas.SQL.Add('FACTURA.montodescuento, FACTURA.iva, FACTURA.montoiva, FACTURA.montototal,');
    qry_ventas.SQL.Add('FACTURA.pagacon, FACTURA.cambio FROM FACTURA LEFT JOIN clientes ON FACTURA.CodCliente=clientes.Idcliente');

    qry_ventas.SQL.Add('where fecha between : pfechainicio and : pfechafin ORDER BY 1');

    qry_ventas.Parameters.ParamByName('pfechainicio').Value : =FormatDateTime('dd/mm/yyyy',freporte_ventas.dtp_fecha_ini.Date);
    qry_ventas.Parameters.ParamByName('pfechafin').Value: = FormatDateTime('dd/mm/yyyy',freporte_ventas.dtp_fecha_fin.Date);
    qry_ventas.Open;

recuerda que ests linesas tiene que los paramentros tienen que ir juntos es decir, dospunto y la variabel lo separe para que aparecieran correctamente

Última edición por microbiano fecha: 15-12-2010 a las 18:49:36. Razón: modificar caritas
Responder Con Cita