cschalk Posted March 10, 2009 Share Posted March 10, 2009 Ok, I am new to iReport / Jasper, but I've found a lot of help on this website. I do have a question though. I've got a text field which computes a value of other fields like this: new Integer($F{input1}.intValue() + $F{input2}.intValue())My question is this: If I want to use this value later in another Text Field, How do I access it's computed value. I've tried assigning a key (called it "computedTotal") but when I use str(<key>), it doesn't allow me to use this value. Is this even possible? Thanks,Chris Link to comment Share on other sites More sharing options...
svenn Posted March 10, 2009 Share Posted March 10, 2009 You could create a variable with that calculation. A lot depends on what you are trying to do with this value. Link to comment Share on other sites More sharing options...
cschalk Posted March 10, 2009 Author Share Posted March 10, 2009 I need the data stored so that I can use it somewhere else. I have been looking at variables, but I don't know how to add my own.in the Expression Builder, it has 5 pre-defined variables. How do I add my own to that list?Thanks! Link to comment Share on other sites More sharing options...
svenn Posted March 11, 2009 Share Posted March 11, 2009 I'm on version 1.3.3 so it might be different on a new version1. Go toView -> Variables2. Chose new3. Enter you dataYou now be able to access your vaiable from the selection list Link to comment Share on other sites More sharing options...
cschalk Posted March 11, 2009 Author Share Posted March 11, 2009 wow, they've really changed things... I finally found it! In version 3.1.4 you can define variables in the Report Inspector. Right Click on Variables and choose "Add Variable"..... because, that's the first place I would look to define a variable. Thank you... I'll see if I can get things to agree! (Jasper is wicked cool, and very feature rich - - therefore it's very hard to understand and kinda headache inducing!)Post Edited by Chris Schalk at 03/11/09 16:50 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