Jump to content
We've recently updated our Privacy Statement, available here ×

Jasper report date parameter?


leejay_bell

Recommended Posts

Hello all, im new to Jasper and dont come from a java background and I am experiencing something strange I hope someone will be able to help me with diagnosing. I have added a date control input to a report and I have configured the jasperserver_config.properties file to use the yy/MM/dd (2014/03/01) format. the date picker display value is in the correct format that I need, I have extended the logging in the jasperserver.log file to try and capture the paramter and SQL values and I have found this line just below the SQL query : Parameter #1 (BillingDate of type java.util.Date): Tue Dec 31 22:03:00 CAT 2013.

This format is incorrect and the date its wrong? I have selected the 2014/03/01 as the date? does anyone know where this date is coming from and why it isnt date pickers date? this date is not related to my hosting server or database date time so im baffled? and needless to say that my report is not returing the required data?

Any help will be appreciated! thanks!

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thanks Mariano! i have created another report and I am still getting this :

 

Parameter #1 (DateFrom of type java.util.Date): Wed Jan 01 00:03:00 CAT 2014

Parameter #2 (DateTo of type java.util.Date): Fri Jan 31 00:03:00 CAT 2014

 

The date value is wrong, i am selecting march not January? i have checked that my parameter and input control ID are identical. I'm not convinced that changing the locale will correct the wrong date being passed to the report?

Link to comment
Share on other sites

Most of my problems about input controls and parameters in query were for names and IDs, notice that if you are using a query repository, defaults values in parameters does not take effect if no input control with the same ID is present. Always pass null to query in this case.

 

In my jasperserver.log date's format are the same in yours and works fine.

 

Regards,

 

Mariano

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...