williambeltran619 Posted October 15, 2015 Share Posted October 15, 2015 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.jpgMy Java Application with JCalendarhttp://i.imgur.com/GeDPidz.jpgSo, 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.jpgBut 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.jpgI have both parameters as "java.util.Date":http://i.imgur.com/pOQAgx6.jpgBut when I go to "Preview" and iReport shows the input for add the two parameters, this happens:http://i.imgur.com/DA4HGaS.jpgI 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.jpgAgain, I go to the preview and this happens:http://i.imgur.com/ZybJSMP.jpgAs 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.jpgI say thanks everybody that would can help me, it's for an university project. Link to comment Share on other sites More sharing options...
hozawa Posted October 15, 2015 Share Posted October 15, 2015 Instead of Date, try using Timestamp Link to comment Share on other sites More sharing options...
williambeltran619 Posted October 16, 2015 Author Share Posted October 16, 2015 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. 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