Loader Posted March 29, 2008 Share Posted March 29, 2008 hi,is it possible to get the various PAGE_NUMBER values during the report filling time and assign these values to others variables?what can i do? thanksManuel Link to comment Share on other sites More sharing options...
svenn Posted March 29, 2008 Share Posted March 29, 2008 The greater question would be why do you want to do this? Link to comment Share on other sites More sharing options...
Loader Posted March 31, 2008 Author Share Posted March 31, 2008 i'm trying to create a report containing some charts.these charts aren't freeze in the page, but their position can change depending on the size of the comments that users can insert.i'm trying to realize the table of contents of the report.the problem is: how can i get the current value of the current page of the chart and put it in the table?in other words, i'm trying to create a dynamic table of contents. regardsManuel Link to comment Share on other sites More sharing options...
svenn Posted March 31, 2008 Share Posted March 31, 2008 You could try creating your own class that extends JRAbstractScriptlet. You could then use getVariableValue to get the page number and setVariableValue to set your value. The problem I see is at what point are you going to call this from your component and how are you going to populate your table of content. Link to comment Share on other sites More sharing options...
Loader Posted April 1, 2008 Author Share Posted April 1, 2008 yes, this is the problem.i have no idea how to do this..i should have a component that "knows" its exact position inside the report and passes the value of its position to the proper variable.in my report there are 3 charts, so i need only three variables, since i need to know the position of only three charts...but it's not so easy to do :blink: Link to comment Share on other sites More sharing options...
svenn Posted April 1, 2008 Share Posted April 1, 2008 You need to find an event that happens at the same time as you graph is produced. 1. Create a text field and sets the color to the same color as your page color. Call your class from the text expression field. 2. Try calling the class from the print when expression of the graph. Link to comment Share on other sites More sharing options...
Loader Posted April 2, 2008 Author Share Posted April 2, 2008 in reality i have 3 subreports and every subreport contains 1 chart..i think it's the same thing.but svenn, why have i to set the color of the textfield equal to that of the chart? tnxManuel Link to comment Share on other sites More sharing options...
Loader Posted April 2, 2008 Author Share Posted April 2, 2008 in reality i have 3 subreports and every subreport contains 1 chart..i think it's the same thing.but svenn, why have i to set the color of the textfield equal to that of the chart? tnxManuel Link to comment Share on other sites More sharing options...
svenn Posted April 2, 2008 Share Posted April 2, 2008 Well I was thinking you want to trigger an event so your class gets called but you don't want the field to actually display anything. I'm trying to give you a few things to try. Link to comment Share on other sites More sharing options...
Loader Posted April 3, 2008 Author Share Posted April 3, 2008 ah ok..now i understand your hint :)i will try as you suggest thank you very much Link to comment Share on other sites More sharing options...
Loader Posted April 9, 2008 Author Share Posted April 9, 2008 it does not work :( 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