Previous Next

Task 2:  Create a counter in Table.onCreate

To count the number of customers whose names contain the string Mini, first declare a global counter and set its value to zero. The Table.onCreate method is the most appropriate place to perform this task because Table.onCreate executes before retrieving any rows. In the next task, you conditionally increment this counter in the Row.onCreate( ) method.


Figure 23-5 List icon in the layout editor

Figure 23-5  List icon in the layout editor

Figure 23-6 Script window

Figure 23-6  Script window
countOfMinis = 0;
If you see an error message, you may have typed the statement incorrectly. If so, go back to the script window, select the method you just modified, correct the error, and choose Preview again.

Figure 23-7 Report preview

Figure 23-7  Report preview

(c) Copyright Actuate Corporation 2012