[#5625] - iReport 4.5 - Text field epression always gets saved as java.lang.String

Category:
Bug report
Priority:
Normal
Status:
Assigned
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Not Attempted
Assigned to:

Any text field that I add to a report always reverts to java.lang.String whenever I save the document. e.g. if I add a text field to accept a data by setting the expression class to java.lang.String, when I save it and reopen the document it is back to java.lang.String.

This appears to happen for all expression class types.

Here is a list of the errors that I get ....

java.lang.Exception: 1 - Errors were encountered when compiling report expressions class file:
1. Cannot cast from Date to String
                value = (java.lang.String)(((java.util.Date)parameter_START_DATE.getValue())); //$JR_EXPR_ID=17$
                        <------------------------------------------------------------------->
2. Cannot cast from BigDecimal to String
                value = (java.lang.String)(((java.math.BigDecimal)field_TOTAL.getValue())); //$JR_EXPR_ID=30$
                        <---------------------------------------------------------------->
3. Cannot cast from Integer to String
                value = (java.lang.String)(((java.lang.Integer)variable_PAGE_NUMBER.getValue())); //$JR_EXPR_ID=33$
                        <---------------------------------------------------------------------->
4. Cannot cast from Date to String
                value = (java.lang.String)(((java.util.Date)parameter_START_DATE.getValue())); //$JR_EXPR_ID=17$
                        <------------------------------------------------------------------->
5. Cannot cast from BigDecimal to String
                value = (java.lang.String)(((java.math.BigDecimal)field_TOTAL.getOldValue())); //$JR_EXPR_ID=30$                         <-------------------------------------------------------------------> 6. Cannot cast from Integer to String                 value = (java.lang.String)(((java.lang.Integer)variable_PAGE_NUMBER.getOldValue())); //$JR_EXPR_ID=33$                         <-------------------------------------------------------------------------> 7. Cannot cast from Date to String                 value = (java.lang.String)(((java.util.Date)parameter_START_DATE.getValue())); //$JR_EXPR_ID=17$
                        <------------------------------------------------------------------->
8. Cannot cast from BigDecimal to String
                value = (java.lang.String)(((java.math.BigDecimal)field_TOTAL.getValue())); //$JR_EXPR_ID=30$                         <----------------------------------------------------------------> 9. Cannot cast from Integer to String                 value = (java.lang.String)(((java.lang.Integer)variable_PAGE_NUMBER.getEstimatedValue())); //$JR_EXPR_ID=33$                         <-------------------------------------------------------------------------------> 9 errors 

tblackler1's picture
Joined: Nov 3 2010 - 8:23am
Last seen: 12 years 11 months ago

1 Comment:

#1

Just noticed. Already reported in bug ID 0005413

Feedback