# GrapeCity.ActiveReports.Aspnetcore.Viewer.ReportingSettings.UseCodeBasedSectionReports

## Content

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



<h1 id="GrapeCity_ActiveReports_Aspnetcore_Viewer_ReportingSettings_UseCodeBasedSectionReports_" data-uid="GrapeCity.ActiveReports.Aspnetcore.Viewer.ReportingSettings.UseCodeBasedSectionReports*">UseCodeBasedSectionReports Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Aspnetcore_Viewer_ReportingSettings_UseCodeBasedSectionReports_" data-uid="GrapeCity.ActiveReports.Aspnetcore.Viewer.ReportingSettings.UseCodeBasedSectionReports*"></a>
<h4 id="GrapeCity_ActiveReports_Aspnetcore_Viewer_ReportingSettings_UseCodeBasedSectionReports_System_Reflection_Assembly_System_String_" data-uid="GrapeCity.ActiveReports.Aspnetcore.Viewer.ReportingSettings.UseCodeBasedSectionReports(System.Reflection.Assembly,System.String)">UseCodeBasedSectionReports(Assembly, string)</h4>
<div class="markdown level1 summary"><p>Uses the code-based reports that are stored in the assembly.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void UseCodeBasedSectionReports(Assembly assembly, string defaultNamespace)</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.reflection.assembly">Assembly</a></td>
      <td><span class="parametername">assembly</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.reflection.assembly">Assembly</a> object containing the code-based reports.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">defaultNamespace</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a> value indicating the default namespace used to locate the reports within the assembly.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Aspnetcore_Viewer_ReportingSettings_UseCodeBasedSectionReports_System_Reflection_Assembly_System_String__examples">Examples</h5>
<pre><code class="lang-csharp">var assembly = typeof(SomeReportClass).Assembly;

app.UseReporting(settings =&gt;
{
	settings.UseCodeBasedSectionReports(assembly, "MyReports");
});</code></pre>

</div>
