d_failla Posted May 12, 2007 Share Posted May 12, 2007 I am iterating through a subreport several times in my main report. I have a need to store some artifact reflecting each iteration that I can evaluate in a later report band. Is there some sort of global stringbuffer mechanism that I can append to after each time through? Link to comment Share on other sites More sharing options...
Case1182 Posted May 12, 2007 Share Posted May 12, 2007 I dont know about a global string, but u could just simply pass a parameter back and forth appending it as it goes Link to comment Share on other sites More sharing options...
svenn Posted May 12, 2007 Share Posted May 12, 2007 I had to do something like that. I created a Java class to store the information and retrieved it when I needed it. Link to comment Share on other sites More sharing options...
d_failla Posted May 13, 2007 Author Share Posted May 13, 2007 I tried passing a variable back and forth previously but whenever I passed the variable back into the subreport the second time, it went back as a null; not the previous value. That has been my problem, it seems to lose scope on each iteration. As for the Java class, would that creted class be part of my iReport or an additonal file (like a scriptlet)? It is desirable that I not have additional files to account for. Link to comment Share on other sites More sharing options...
svenn Posted May 14, 2007 Share Posted May 14, 2007 You would have to create an additional file. You could either 1. Create a class using the Scriptlet Editer 2. Create your own class by extending JRDefaultScriptlet 3. Create your own class 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