Grouping Data

You can use field formatting to group data at run time. Suppose you have a bound list of products and you want to group together all of the items ordered within the same year. This example assumes a data source similar to the Northwind sample database.

To group data by the year at runtime:

  1. Add the following fields to the grid view by selecting them in the C1OlapPanel area of the C1OlapPage: OrderDate, Product, and Sales. Click the Olap Grid tab, if necessary, to view the grid.
  2. Right-click the Order Date field under Row Fields and select Field Settings. The Field Settings dialog box appears.
  3. Make sure Select All is selected on the Filter tab.
  4. Click the Format tab and select Custom.
  5. Enter "yyyy" in the Custom Format text box and click OK.

The following images show the grid before grouping and after grouping. In the Before Grouping image, the OrderDates are not grouped. In the After Grouping image, the products are grouped together by the year they were purchased.

Before Gouping

After Grouping

 

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback