itworker Posted November 23, 2016 Share Posted November 23, 2016 I have create in Report variable with type of 'myJavaClass' (eg: 'Value Class Name' -> de.testlib.jasper.myJavaClass).The JavaClass with the name 'myJavaClass.java' I created before: This JavaClass has getter and setter for Java variables. I need myJavaClass.java for manipulate the values I get from Jasper.In next step I want to use this JavaClass as variable in Jasper as variable.But I have a big problem how to define expresions (Initial Value Expression, Increment type, Incrementer Factory Class Name).A) Initial Value Expression: 'new myJavaClass()'B) Expression: '$V{myJavaClass}.add(3)'In the groupefooter I have a field to get the value of '$V{myJavaClass}' with '$V{myJavaClass}.getData()'When I start the Report I get the Exception with message, that it is not possible to set value in the JavaClass. Why isn't possible to set value to myJavaClass with Jasper? I thing it should be possible, but how?I'm looking for any ideas...-itworker- Link to comment Share on other sites More sharing options...
Balraj Posted November 28, 2016 Share Posted November 28, 2016 Initial Value Expression: this should be default value which you want to pass to your java classIncrementType: this should be your group(as you are using this variable in group footer)Incrementer Factory Class Name: I've not worked on this yet.Regards,JasperExplorer 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