Building Jasperreport Textfield message with multiple parameters and types
Im trying to create a message in a textfield which uses a localized string
in a properties file. The string has 5 parameters, 1 string, 2 numbers and
2 dates.
For some reason i get this message when trying to compile it.
The method msg(String, Object) in the type JREvaluator is not applicable
for the arguments (String, String, Integer, Integer, Date, Date)
Here is the textfield
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="5c7c4cab-cbd4-4c0b-8393-c3b5ba3bc856"
positionType="Float" x="0" y="0" width="530" height="20"/>
<textElement>
<font size="14" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[msg($R{report.title},$P{QUERY_LEGAL_ENTITY_NAME},
$P{QUERY_START_ACCOUNT_NUMBER},
$P{QUERY_END_ACCOUNT_NUMBER},
$P{QUERY_START_DATE},
$P{QUERY_END_DATE}
)]]></textFieldExpression>
</textField>
And here is the properties string
report.title=Finanskonti for {0} | Konti: {1, number} - {2,number} |
Datoer: {3,date} - {4,date}
Got any ideas what im doing wrong
No comments:
Post a Comment