Use odd and even styles

This procedure describes the steps to create a report using odd and even styles.

  1. Create a new report.
  2. Drop the required fields from the Field List onto the report's Detail band.

    For more information, see Report bands.

  3. Select the Detail band, and in the Property Grid, expand the Styles property.
  4. On the drop-down list for the Even Style property, click (New).
    The xrControlStyle1 setting will be assigned to the Even Style property.
  5. Expand the Even Style property, and set the Background Color property to Beige.
    You can configure other properties in this section as required.
  6. Repeat steps 3 through 5 for the Odd Style property.
    That is, create a new style and set its Background Color property to Ivory.
  7. If you switch to the Preview tab now, you will see the following result.
    Odd Even Styles

    You can observe in the figure that the created styles are applied to all of the controls that are contained in the Detail band.

  8. Suppose that a different style is required for one of the fields. To accomplish this, do the following.
    1. Select the required field, and in the Property Grid and expand its Styles property
    2. Open the drop-down list for the Style property, and click (New).
    3. Expand the Style property, and for the created xrControlStyle3, set the Background Color property to White.
    4. The style of this control has priority over the Detail band's styles. Switch to the Preview tab, and view the result.
    Odd Even Styles