# GrapeCity.ActiveReports.Rdl.Model.DataSetExtensions.GetRootDataSet

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_ActiveReports_Rdl_Model_DataSetExtensions_GetRootDataSet_" data-uid="GrapeCity.ActiveReports.Rdl.Model.DataSetExtensions.GetRootDataSet*">GetRootDataSet Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Rdl_Model_DataSetExtensions_GetRootDataSet_" data-uid="GrapeCity.ActiveReports.Rdl.Model.DataSetExtensions.GetRootDataSet*"></a>
<h4 id="GrapeCity_ActiveReports_Rdl_Model_DataSetExtensions_GetRootDataSet_GrapeCity_ActiveReports_PageReportModel_IDataSet_System_Func_System_String_GrapeCity_ActiveReports_PageReportModel_IDataSet__" data-uid="GrapeCity.ActiveReports.Rdl.Model.DataSetExtensions.GetRootDataSet(GrapeCity.ActiveReports.PageReportModel.IDataSet,System.Func{System.String,GrapeCity.ActiveReports.PageReportModel.IDataSet})">GetRootDataSet(IDataSet, Func&lt;string, IDataSet&gt;)</h4>
<div class="markdown level1 summary"><p>Gets a root dataset by traversing up the dataset hierarchy.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static IDataSet GetRootDataSet(this IDataSet dataSet, Func&lt;string, IDataSet&gt; getDataSetFn)</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="GrapeCity.ActiveReports.PageReportModel.IDataSet.html">IDataSet</a></td>
      <td><span class="parametername">dataSet</span></td>
      <td><p>A starting <a class="xref" href="GrapeCity.ActiveReports.PageReportModel.IDataSet.html">IDataSet</a> object.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="GrapeCity.ActiveReports.PageReportModel.IDataSet.html">IDataSet</a>&gt;</td>
      <td><span class="parametername">getDataSetFn</span></td>
      <td><p>A function to retrieve a dataset by name.</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="GrapeCity.ActiveReports.PageReportModel.IDataSet.html">IDataSet</a></td>
      <td><p>A root <a class="xref" href="GrapeCity.ActiveReports.PageReportModel.IDataSet.html">IDataSet</a> object in the hierarchy.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
