The articles in this section of the Knowledge Base involve working with Groups for display in reports. To learn more about Groups and how to access the Report Designer, see Understanding Groups in the Report Designer. This article details Events in regards to Groups.
Just like with a Data band, the Group Header band has three specific rendering events available. While Rendering Events are applied to individual Data Rows when assigned to the Data band, when assigned to the Group Header band, the events are applied to groups.
To access these events, select the Group Header band and select the Events button
at the top of the Properties window.
Fig. 01 – Render Events
Begin Render Event
The Begin Render Event is called at the beginning of a new group being output. This event can be used for the initialization of data or variables, or for calling certain actions.
End Render Event
The End Render Event is called after the group is rendered. Data processing and the calculation of totals are usually performed in the handler of this event.
Rendering Event
The Rendering Event is called when the report generator is rendering one data row from a group.
The following tutorial provides an example for working with these events:
Create the “counter” variable in the Data Dictionary.
Select the Page tab > select Panels > select Dictionary.
Select New Item > New Variable.
From the New Variable window, create a new int type variable named “counter.” Assign it a value of “0.” See Figure 04.
Close the Dictionary Window > select the Group Header band for the event to be applied to > select the Events tab > write the following code in the Begin Render Event:
Enter the following expression into a Text Component where you want the counter value to be displayed:
Process the report. The results should look something like Figure 07.