scottmacpherson Posted February 15, 2007 Share Posted February 15, 2007 I am struggling to get a report with has a data input control working through JasperServer.The problem appears to be that the date entered by the user at runtime is sent to our data source in an incompatible format. The database is Oracle 9.2.8, and the JDBC driver is from the Oracle 10 instant client. The date is selected by the user using the calendar tool, ending up with something like "15-02-2007". However, by monitoring the output to the database, the date is sent as "Thu Feb 15 00:00:00 UTC 2007". This obviously causes an Oracle error. If we run the same jrxml file through iReport, it works perfectly. iReport seems to know how to handle the date correctly. Even more confusing is the fact that this was all working perfectly yesterday, but stopped today. We can't think of anything that could have changed! Link to comment Share on other sites More sharing options...
Teodor Danciu Posted February 19, 2007 Share Posted February 19, 2007 Hi, Can you copy/paste here the SQL query from your JRXML file? The whole JRXML attached would be even better. Thank you,Teodor Link to comment Share on other sites More sharing options...
scottmacpherson Posted February 22, 2007 Author Share Posted February 22, 2007 Have attached the full jrxml file for this one. Could it be something to do with the fact that the database field is a timestamp? I still don't understand why iReports works fine though. [file name=AbsencesBySPRBatch1.jrxml size=15579]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/AbsencesBySPRBatch1.jrxml[/file] Link to comment Share on other sites More sharing options...
avu Posted April 25, 2007 Share Posted April 25, 2007 Interesting ... I'm having the same problem. I'm trying to pass date parameters into a MySQL store procedure. The dates are select from Jasper Server calendar widget with the date format dd-mm-yyyy; however, it's passing this date format: 'Fri Jul 30 19:00:00 EST 6' to mysql? What's also strange is it's not even the date I selected from the calendar widget? Please help, Ann [file name=dateFormatError.txt size=2288]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/dateFormatError.txt[/file] Link to comment Share on other sites More sharing options...
Teodor Danciu Posted April 25, 2007 Share Posted April 25, 2007 Hi, Scott, what is the exact stack trace you get? Thanks,Teodor Link to comment Share on other sites More sharing options...
jreevessingletouch.net Posted August 4, 2008 Share Posted August 4, 2008 I was having the same problem with my JasperReports 3.0 pro trial. I did not experience this with the community version. However, I was able to fix the issue in the pro version by converting my parameter data type to java.sql.Timestamp (it had been java.util.Date previously). Any word on why this will work in the community version and not the pro version? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now