Jump to content

BIRT Developer Center Download


Photo
- - - - -

Dynamic Marker Line in BarChart different for each group


  • Please log in to reply
2 replies to this topic

#1 vkober

vkober

    Advanced Member

  • Members
  • PipPipPip
  • 35 posts

Posted 14 May 2012 - 10:54 PM

Hi, In this example, a dynamic marker line is putted on the bar chart. By script I find the value I want to put on the chart : reportContext.setPersistentGlobalVariable("MAX_PRODUCT", this.getValue()); on "onCreate" and use with onRender script on the graph. But I would to group my report by productlines and made the dynamic value change to being the max of each product line... But I don't find how to change the value in each group Any Idea ? Thanks in advance for your answer. Vincent

Attached Files


---
Vincent
In charge of Business Intelligence System
Grenoble Alpes M?tropole
France

#2 vkober

vkober

    Advanced Member

  • Members
  • PipPipPip
  • 35 posts

Posted 16 May 2012 - 06:07 AM

Hi

Answer to myself ;-)
I put the
reportContext.setPersistentGlobalVariable("MAX_PRODUCT", this.getValue());
in onRender instead of "onCreate"

The first time I run the script I have an error...but now It seems to be good...

Regards
---
Vincent
In charge of Business Intelligence System
Grenoble Alpes M?tropole
France

#3 vkober

vkober

    Advanced Member

  • Members
  • PipPipPip
  • 35 posts

Posted 16 May 2012 - 07:59 AM

Sorry ;-)

in onCreate method, I declare the Variable :
reportContext.setPersistentGlobalVariable("MAX_PRODUCT", "");

in onRender method, I find the good value :
reportContext.setPersistentGlobalVariable("MAX_PRODUCT", this.getValue());

And it's good

Regards
---
Vincent
In charge of Business Intelligence System
Grenoble Alpes M?tropole
France