General information
Category:
Reports & Report designer
Title:
Problemas con el alcance del informe
Hola atodos:
Estoy creando un informe, para ello creo un cursor temporal y lanzo el informe con REPORT FROM. El cusor esta basado en un SELECT..WHERE que utilizo para filtrar datos. El problema es que aunque el cursor se llena correctamente, el informe me muestra todos los registros.
¿Alguien sabe que estoy haciendo mal?.
¿Es posible que este debido a las INNER JOIN?
El codigo es el siguiente:
***********************************************************
*!* genero el filtro
lcWhere = " WHERE Vencimientos.fecha_ven >= lcDesde AND Vencimientos.fecha_ven <= lcHasta "
DO case
CASE thisform.optiongroup1.Value = 1
lcWhere = lcWhere + " AND Vencimientos.vpagado = .T. "
CASE thisform.optiongroup1.Value = 2
lcWhere = lcWhere + " AND Vencimientos.vpagado = .F. "
ENDCASE
*!* genero consulta
lcConsulta = "SELECT Vencimientos.idvencim, Vencimientos.fecha_ven, ";
+" Vencimientos.vpagado, Facturas.nrofact, Vencimientos.total, ";
+" Vencimientos.fecha_pago, Proveedo.noms ";
+" FROM datos!facturas INNER JOIN datos!vencimientos ";
+" INNER JOIN datos!proveedo ";
+" ON Proveedo.codigo = Facturas.proveedor " ;
+" ON Facturas.idfact = Vencimientos.fact " ;
+ lcWhere;
+" into cursor temp1"
*!* ejecuto consulta
&lcConsulta
*!* Llamo al informe
SELECT temp1
REPORT FORM vencimientos TO PRINTER PROMPT preview
**********************************************************
Saludos.
Iñaki.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only