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

Charts Grouping and scriptlets


Recommended Posts

By: soujiro_as - soujiro_as

Charts Grouping and scriptlets

2006-04-20 08:07

I have an issue, I have a report with groups like this:

 

GROUP1 "G1"

GROUP1.1 "GA"

value1 | value2

...... ......

SUM value2 in GROUP1.1 "S1"

GROUP1.2 "GB"

value1 | value2

...... ......

SUM value2 in GROUP1.2 "S2"

----SUM value2 in GROUP1 "SS1=S1+S2"

GROUP2 "G2"

GROUP2.1 "GA"

...... ...... etc.

 

**********SUM value2 in REPORT ("S1+S2+...")

 

Every Group have totalizators (SUM, AVERAGE, MAX OR MIN) depending of the configuration of the user, exists subtotals and a report total.

 

I'm implementing the charts (also configured by the user), by example, an user may select a Pie Chart, select the grouping of level 1 (in this case GROUP1 and GROUP2) as the keys, and the SUM totalizator as values, this is easy, I use variables for the values of the totalizators, then in the chartdataset I can configure the expression of group as the keys expression (resulting G1, G2), and the value of the totalizator as the values (resulting SS1 values in a determinated time), setting an incrementGroup to the pieDataset, all is o.k.

 

But, the user can select the nested Group as the keys value, in this case, the pie chart will have the keys "GA" and "GB", and the values of the sum totalizator should be the SUM of the values of "S1" in all the groups for the key "GA", and the SUM of "S2" in all the groups for the key "GB". I have done this in a scriptlet, calculating the SUM in the event "afterDetailEval" but I don´t know when the group ends in order to set the variable value, then I set the variable value in every row evaluation (in the same "afterDetailEval" event), the SUM is calculated o.k. at the end, but the Chart shows some of the first values setted to the variable (not the final calculated value).

 

How can I tell to the engine to use the last setted variable value instead of some of the first setted values?, or exists some other way to do this without subDatasets? (I worry about the performance)

 

Thanks, and sorry for my poor english.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...