# C1.Report.GroupCollection.Add

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Report_GroupCollection_Add_" data-uid="C1.Report.GroupCollection.Add*">Add Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Report_GroupCollection_Add_" data-uid="C1.Report.GroupCollection.Add*"></a>
<h4 id="C1_Report_GroupCollection_Add_System_String_System_String_C1_Report_SortEnum_" data-uid="C1.Report.GroupCollection.Add(System.String,System.String,C1.Report.SortEnum)">Add(string, string, SortEnum)</h4>
<div class="markdown level1 summary"><p>Adds a new <a class="xref" href="C1.Report.Group.html">Group</a> to the collection, along with header and footer sections for the new group.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Group Add(string name, string groupBy, SortEnum sort)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Add(name As String, groupBy As String, sort As SortEnum) As Group</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">name</span></td>
      <td><p>Contains the name of the new group.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">groupBy</span></td>
      <td><p>Contains the value of the <a class="xref" href="C1.Report.Group.GroupBy.html#C1_Report_Group_GroupBy">GroupBy</a> property for the new group.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Report.SortEnum.html">SortEnum</a></td>
      <td><span class="parametername">sort</span></td>
      <td><p>Contains the value of the <a class="xref" href="C1.Report.Group.Sort.html#C1_Report_Group_Sort">Sort</a> property for the new group.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Report.Group.html">Group</a></td>
      <td><p>A reference to the newly added group.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Report_GroupCollection_Add_System_String_System_String_C1_Report_SortEnum__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>When a group is added to a report, the control automatically adds two new sections, the group header and group
footer sections for the new group. These new sections are invisible by default.</p>
</div>
</div>
