-1

So it seems i can't create a string from properties file with more than 3 parameters plus the pattern:

msg(str("lifeletter."+$P{COD_DOC}+".message"),$P{PR_YEAR},$P{MODULE_NAME},$F{benefit_value},$F{accumulated_value})

I get this error:

The method msg(String, Object, Object, Object) in the type JREvaluator is not applicable for the arguments (String, String, String, String, String) value = msg(str("lifeletter."+((java.lang.String)parameter_COD_DOC.getValue())+".message"),((java.lang.String)parameter_PR_YEAR.getValue()),((java.lang.String)parameter_MODULE_NAME.getValue()),((java.lang.String)field_benefit_value.getValue()),((java.lang.String)field_accumulated_value.getValue())); //$JR_EXPR_ID=10$

If i remove the last param(accumulated_value {3}) it will work

here is the .properties file entry:

letter.product.message = Caro Cliente, Vimos pela presente informar que, em {0} , foi atribuida participação nos resultados ao seu {1} no valor de {2}. \ Desta forma, o valor acumulado atual da participação nos resultados é de {3}.

Maxrunner
  • 1,955
  • 4
  • 24
  • 41

1 Answers1

0

I solved this by using the java class MessageFormat:

new MessageFormat(str("pattern")).format(new Object[]{"value 1","value 2", "value 3","value 4"})
Maxrunner
  • 1,955
  • 4
  • 24
  • 41