#### How to provide code for the ReportDesign.initialize method

You provide code for the ReportDesign.initialize method by performing the following steps:

1. Choose the Script tab.
2. Choose the Outline view.
3. In Outline, select the top line, as shown in Figure 22-2.

4. In Script, select the Initialize( ) method.
5. Type the code into the script editor.

The BIRT Report Designer appears, as shown in Figure 22-3.

### Providing the code for the methods you want to track

For every method that you want to track, provide a single statement generating a line of output to your log file, as shown in the following statement:

    printWriter.println( "Table.onRow" );

To provide code for a report item method you want to track, first select the appropriate object from Outline and select the appropriate method from the method selection list. Then use the same steps for entering code into a method, as shown in the preceding section.

To provide code for a data set or the data source method, select the appropriate data source or data set from Data Explorer before selecting the method you want to track.

### Providing the ReportDesign.afterFactory code

The following statement in the ReportDesign.afterFactory method closes the file.

    printWriter.close( );

Using this method flushes all the buffers and ensures that all method output appears in the file.

To provide the ReportDesign.afterFactory code, select the top line of the outline and select the afterFactory method on the code page.