Report Header Bean

Walkthrough

No additional design work is required to create a report bean from the existing report header. Simply copy and paste the appropriate elements into a report bean and define the appropriate properties.

1. Copy and paste the title elements into a report bean.

 

2. Select 'Bean Definition' from the Style Studio Report menu. This opens the 'Bean Definition' dialog box.

3. Add the 'Text' property of the subtitle element to the right frame, and enter 'subtitle' for the property name.

4. Add the 'Text' property of the section title element to the right frame, and enter 'section title' for the property name.

The script on the date field remains the same:

var now = new Date();

 

switch(now.getMonth()) {

case 0: case 1: case 2:

   text = "1sr Qtr";

   break;

case 3: case 4: case 5:

   text = "2nd Qtr";

   break;

case 6: case 7: case 8:

   text = "3rd Qtr";

   break;

case 9: case 10: case 11:

   text = "4th Qtr";

   break;

}

 

text = text + ", " + formatDate(now, 'yyyy');

Since the script uses the property of the text element to which it is attached, references are automatically resolved to the current element. To use the bean, simple replace the elements in the report with the bean.

<< 3.10.3 Report Bean Example © 1996-2013 InetSoft Technology Corporation (v11.5) Total Field Bean >>