0
Вот выдержка из моего jrxml:Как отображать дату в определенном формате И Locale в JasperReports?
<textField>
<textFieldExpression><![CDATA["Exported on " + new java.text.SimpleDateFormat("dd-MMM-yyyy HH:mm:ss z").format(new java.util.Date(), java.util.Locale.US)]]></textFieldExpression>
</textField>
И я получаю эту ошибку при компиляции с Jaspersoft Studo 6.0.4.Final:
Errors were encountered when compiling report expressions class file:
1. The method format(Date, StringBuffer, FieldPosition) in the type SimpleDateFormat is not applicable for the arguments (Date, Locale)
value = "Exported on " + new java.text.SimpleDateFormat("dd-MMM-yyyy HH:mm:ss z").format(new java.util.Date(), java.util.Locale.US); //$JR_EXPR_ID=28$
Что выглядит очень странно, потому что SimpleDateFormat
не имеют какой-либо format(Date, StringBuffer, FieldPosition)
способ!