Jump to content
We've recently updated our Privacy Statement, available here ×

dynamic values


Loader

Recommended Posts

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

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.

 

regards

Manuel

Link to comment
Share on other sites

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...