
29/10/2009, 08:02
|
 | | | Fecha de Ingreso: septiembre-2009
Mensajes: 502
Antigüedad: 15 años, 7 meses Puntos: 47 | |
Respuesta: ordenar registros con Dataareport & "and ventas.f_emision = " & Format(fecha, "yyyymmdd") & " and ventas.estacion = '" & caja & "'" _
& "and ventas.estado = '" & "CO" & "' order by ventas.NO_REFEREN} AS acmdiarioventa COMPUTE acmdiarioventa, SUM(acmdiarioventa.'IMPORTE')" _
& "AS TotalImporte, SUM(acmdiarioventa.'IMPUESTO') AS TotalIva BY 'estacion','USUARIO'"
-----------------
Por que pones: & "and ventas.estado = ' " & "CO" & " ' order by ventas.NO_REFEREN}
Si CO es un texto ponlo asi: & "and ventas.estado = 'CO'
El order by creo que lo haces en la linea: BY 'estacion','USUARIO'", cambia 'USUARIO' por ventas.NO_REFEREN, a ver que sale... |