I am trying to create a chart with lines where dates on the x-axis. The periods between the dates are different. First i selected a category dataset. The only problem was the formatting of the dates which i need in a dd.MM.yy pattern. Other as is in normal reports there is no pattern item. I tried to edit the xml-file but this was not successful. Next step was to try it with a time series dataset. There a period was asked for but as just mentioned a fix period doesn't exist.
The Ultimate Guide doesn't tell anything to this.
Would be more than happy for help.
Another question: is there a documentation about jrxml available?
Michael Fischer
2 Answers:
Hi Michael,
you could have formatted the dates in your line chart in the category expression directly (in java), like:
java.text.SimpleDateFormat("MM.dd.yy").format($F{date-field})
Cheers, Thomas
Hi Thomas,
thank you so much for your reply.
First i did was to change the class type from java.sql.Timestamp to java.util.Date.
Second i changed the caategory expression as you have suggested. After this the filling process could not work. Maybe a syntax error?
In the attached file all is documented.
Would be wonderful to hear from you again.
Best regards Michael
Attachment | Size |
---|---|
![]() | 8 KB |
new java.text.SimpleDateFormat("MM.dd.yy").format($F{date-field})
or simply
new SimpleDateFormat("MM.dd.yy").format($F{date-field})