Previous Next

Task 10:  Display credit limit ranges in the table of contents

Rather than display the first value of each credit limit group, the table of contents makes more sense if it displays the same credit limit range values as the report. You accomplish this task by using the same JavaScript expression that you used previously to display credit limit ranges (0 - 49999, 50000 - 99999, and so on) in the group header.

1  
2  
3  
Edit Group, shown in Figure 7-30, displays the properties of the group. Under Table of Contents, Item Expression is set, by default, to the grouping field, row["CREDITLIMIT"].

Figure 7-30 Edit Group displaying the properties of credit_group

Figure 7-30  Edit Group displaying the properties of credit_group
4  
for(i=50000; i<300000; i+=50000){
if( row["CREDITLIMIT"] < i ){
  rangeStart = i-50000;
  rangeEnd = i-1;
  break;
}
}
displayString = rangeStart + " - " + rangeEnd;
Choose OK to save the expression.
5  
6  

Figure 7-31 Updated table of contents

Figure 7-31  Updated table of contents

 


(c) Copyright Actuate Corporation 2013