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.
My Java Application with JCalendar
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.
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:
I have both parameters as "java.util.Date":
But when I go to "Preview" and iReport shows the input for add the two parameters, this happens:
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:
Again, I go to the preview and this happens:
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:
I say thanks everybody that would can help me, it's for an university project.