Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/07/2011, 01:43
Pelirr
 
Fecha de Ingreso: diciembre-2008
Mensajes: 233
Antigüedad: 15 años, 5 meses
Puntos: 1
problemas con fechas en parametros en jasperreport

Hola, tengo un problema al pasar unas fechas como parámetros a un jasperreport, si utilizo la query

select * from arrivalFlight a, departureFlight b where a.scheduledTime between '2011-06-09 10:11:00' and '2011-06-09 10:11:00' and b.scheduledTime between '2011-06-09 10:11:00' and '2011-06-09 10:11:00' order by a.scheduledTime,b.scheduledTime

estupendo, pero si le paso las fechas como parámetros:

select * from arrivalFlight a, departureFlight b where a.scheduledTime between $P{fechaInformeDesde} and $P{fechaInformeHasta} and b.scheduledTime between $P{fechaInformeDesde} and $P{fechaInformeHasta} order by a.scheduledTime,b.scheduledTime

no me devuelve nada. He visto en este mismo foro un antiguo tema:

Cita:
Respuesta: Formato de fechas en ireport como parametros

--------------------------------------------------------------------------------
SELECCIONÁ el parámetro(textField) EN/DENTRO de la hoja del Reporte, no en el Report Inspector (a la izquierda)
Google suele ser una buena herramienta
http://www.google.com.ar/search?clie...utf-8&oe=utf-8

----------------------------------------------------------------------------------------------
We will modify the elements of Page Footer now. To change the date format, select date element (new java.util.Date()), go to Properties | Text Field Properties, and see the Pattern.

http://www.packtpub.com/sites/defaul...8808_03_19.png


Now, follow the steps listed to change the date pattern:
Open the pattern editor by clicking the button next to Pattern.
Select Date from Category.
Select dd/MM/yyyy h.mm a from the Type window.
http://www.packtpub.com/sites/defaul...8808_03_20.png

Press OK. The date pattern is changed to the output, as shown in the following screenshot:
pero yo no tengo el parámetro dentro de la hoja de reporte, sólamente en la consulta, por lo que no encuentro en properties el "pattern".

Podría alguien darme una idea de cual es mi error? Igual el formato que le paso no es el adecuado.

Un saludo