Set the Group Span for a Column

If there is a one-to-one relationship between a grouped column and another column, you can associate the two columns. This produces the same report output but requires less sorting of the query results.

For example, the Product type code and Product type data items have a one-to-one relationship. Each product type code corresponds to one product type. You can show these columns in a report so that each product type code and corresponding product type appear once, beside each other, spanning the detail rows. Instead of grouping both columns, you can group one column and then set the group span for the second column with the grouped column to achieve the same visual result while improving efficiency.

Do not set the group span for two or more columns if the data in the columns does not have a one-to-one relationship.

Before you begin

There must be at least one grouped column in the list or repeater before you can set the group span.

Procedure

  1. Add a listColumnRowSpan element to the listColumnBody element that you want to span with a grouped column.
  2. Set the refDataItem attribute value to the name of the grouped column.
    Sample XML
    <listColumnBody>
     <contents>
      <textItem>
       <dataSource>
        <dataItemValue refDataItem="Product type"/>
       </dataSource>
      </textItem>
     </contents>
     <listColumnRowSpan refDataItem="Product type code"/> 
     <style>
      <defaultStyles>
       <defaultStyle refStyle="lc"/>
      </defaultStyles>
     </style>
    </listColumnBody>

Results

In this sample, the product type code column is grouped and sets the control break. Each unique code appears only once, spanning the corresponding detail rows. Although control breaks also appear for the Product Type column, the Product Type column is not grouped, it is spanned with the Product Type Code column. The resulting report is as follows.
Figure 1. Sample of a group span in a Reporting report
This 4 column table matches the description above.