Hello,
i am passing JRMapArrayDataSource to the fillmanager. In the datasource i´ve got two values as String (one is casted from Integer to String to pass it as a map).
I can display both values in a simple Report without charting.
Now i want to do a pie chart with these two values. The report compiles fine, but the fillmanager throws an JRException saying that he has problems evaluating the expression for the Value-Field of the PieChart.
I declared the Field as java.lang.Object and cast it to Integer in the value-Expression field:
i am passing JRMapArrayDataSource to the fillmanager. In the datasource i´ve got two values as String (one is casted from Integer to String to pass it as a map).
I can display both values in a simple Report without charting.
Now i want to do a pie chart with these two values. The report compiles fine, but the fillmanager throws an JRException saying that he has problems evaluating the expression for the Value-Field of the PieChart.
I declared the Field as java.lang.Object and cast it to Integer in the value-Expression field:
Code: |
<valueExpression><!(java.lang.Integer) [CDATA[$F{Interger_as_String_Field}]]></valueExpression><br /> </td></tr></tbody></table><br /> <br /> but it still throws a JRException saying that he has problems evaluating the expression for the Value-Field of the PieChart.<br /> So how can i chart from a JRMapArrayDataSource with the values passed as Strings?<br /> <br /> I have the feeling that i am overlooking something essential. Can someone point me to the right direction?<br /> <br /> best regards,<br /> <br /> midrag |
1 Answer:
Posted on November 6, 2006 at 8:36am
solved my problems.
Code: |
Integer.valueOf($F{Number_as_String_Field})</td></tr></tbody></table><br /> <br /> now i am able to chart from BeanDataSources :-).<br /> <br /> Still i am confused why the engine cant handle:<br /> <br /> <table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"><tbody><tr><td><b>Code:</b></td></tr><tr><td><pre>Integer.parseInt($F{Number_as_String_Field})</td></tr></tbody></table><br /> <br /> best regards,<br /> <br /> midrag<br>Post edited by: midrag, at: 2006/11/06 08:58 |