Hello friends from around the world! Greetings from Colombia, thanks for having me here. I need to do monthly reports. I just select the JasperReports library and I use the iReport as a Pluging for NetBeans.
How? The user have to select a date range for those reports. So I use the JCalendar library with the JDateChooser.
http://i.imgur.com/nkKN76S.jpg
My Java Application with JCalendar
http://i.imgur.com/GeDPidz.jpg
So, the user select the date range for the reports through two JDateChooser. Then, he can click on "Generate Report" (the button to the right) and the JasperViewer would make his apparition.
http://i.imgur.com/CEtUbSh.jpg
But the problem is that the parameters in iReport don't recognize anything. I think that is because the date in MySQL is yyyy-MM-dd:
http://i.imgur.com/cJncEsA.jpg
I have both parameters as "java.util.Date":
http://i.imgur.com/pOQAgx6.jpg
But when I go to "Preview" and iReport shows the input for add the two parameters, this happens:
http://i.imgur.com/DA4HGaS.jpg
I wrote: 2015-08-22 (like I have my date in MySQL) but it just shows "Document has no pages".
Then, I just add the parameters to the report to finally change his field pattern to "yyyy-MM-dd" (like is in my MySQL) and "yyyy-MM-dd" isn't in the "Date" category:
http://i.imgur.com/2UUu5S7.jpg
Again, I go to the preview and this happens:
http://i.imgur.com/ZybJSMP.jpg
As all can see, the parameter needed is "d/M/y" (when I have in MySQL: "yyyy-MM-dd"), BUT, in the text field of iReport we have: "Mon 02/18/2013", so the question is: Why "Mon"???
I just need that the parameter in iReport is recognized as "yyyy-MM-dd" in MySQL, but the date are already in the database, with the Java Application I don't send any information to the database, the JDateChooser is just to pass those dates to the report in iReport with the parameters map.
What I need to do???
By the way, this is my Query in SQL:
http://i.imgur.com/gpNhTdU.jpg
I say thanks everybody that would can help me, it's for an university project.
Thanks my friend, but It's don't works!
I just want that a Parameter reads a date of type "yyyy-MM-dd" from MySQL.