Gets or sets the expression used to break records into groups.
Namespace:
C1.C1ReportAssembly: C1.C1Report.2 (in C1.C1Report.2.dll)
Syntax
C# |
---|
[DefaultValueAttribute("")] public string GroupBy { get; set; } |
Visual Basic |
---|
<DefaultValueAttribute("")> _ Public Property GroupBy As String Get Set |
Remarks
This property contains a VBScript expression that is evaluated for every record
in the source recordset. A new group is started whenever the value of this expression changes.
Examples
The following code groups records by category name, then by product name:
Copy CodeVisual Basic
c1r.Groups(0).GroupBy = "CategoryName" c1r.Groups(0).Sort = SortEnum.Ascending c1r.Groups(1).GroupBy = "ProductName" c1r.Groups(1).Sort = SortEnum.Ascending |
Copy CodeC#
c1r.Groups[0].GroupBy = "CategoryName"; c1r.Groups[0].Sort = SortEnum.Ascending; c1r.Groups[1].GroupBy = "ProductName"; c1r.Groups[1].Sort = SortEnum.Ascending; |
You can also add grouping using the Sorting and Grouping dialog box at design time. For an example, see the Grouping and Sorting Data topic.