homer Posted October 7, 2006 Share Posted October 7, 2006 Hi, I have a variable which hold informations to generate a graphic in the sumary band. Informations are added to the variable in the group band by a call to a static method. The variable is configured like this : - Calculation type : nothing- Reset type : group- Reset group : graph- Initial value = a static method call which return a default value.- Variable expression = a static method call which use this variable and return its new value for each group value. When I run the report, I have a NullPointerException when the variable expression static method is called. If I understand the problem, to build the report, Jasper try to estimate the value of the variable. When it does this, it don't use the initial expression to initialize the variable and so the variable value is null and the method call failed. Can you help me ? I don't know what to do. Link to comment Share on other sites More sharing options...
homer Posted October 9, 2006 Author Share Posted October 9, 2006 Can anyone help me ? What I missed ? Link to comment Share on other sites More sharing options...
homer Posted October 10, 2006 Author Share Posted October 10, 2006 There aren't jasperreports master which could help me to resolve my big problem ? Post edited by: homer, at: 2006/10/10 09:52 Link to comment Share on other sites More sharing options...
Teodor Danciu Posted October 11, 2006 Share Posted October 11, 2006 Hi, I think you would have better control over your variable if you would just use the scriptlet functionality.Also, the calculation type for your variable in that case would be System. Sometimes is just too complicated to control a variable by only playing with its expressions, especially because the expression is evaluated more than once with every record, as you mentioned. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
homer Posted October 11, 2006 Author Share Posted October 11, 2006 Hi, Thanks master for your reply ;) I will meditate on this. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now