# GrapeCity.ActiveReports.Web.Viewer.ReportViewerConfiguration.UseResourceProvider

## Content

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



<h1 id="GrapeCity_ActiveReports_Web_Viewer_ReportViewerConfiguration_UseResourceProvider_" data-uid="GrapeCity.ActiveReports.Web.Viewer.ReportViewerConfiguration.UseResourceProvider*">UseResourceProvider Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Web_Viewer_ReportViewerConfiguration_UseResourceProvider_" data-uid="GrapeCity.ActiveReports.Web.Viewer.ReportViewerConfiguration.UseResourceProvider*"></a>
<h4 id="GrapeCity_ActiveReports_Web_Viewer_ReportViewerConfiguration_UseResourceProvider_GrapeCity_ActiveReports_Web_Viewer_IReportResourceProvider_" data-uid="GrapeCity.ActiveReports.Web.Viewer.ReportViewerConfiguration.UseResourceProvider(GrapeCity.ActiveReports.Web.Viewer.IReportResourceProvider)">UseResourceProvider(IReportResourceProvider)</h4>
<div class="markdown level1 summary"><p>Uses a custom resource store provider.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public ReportViewerConfiguration UseResourceProvider(IReportResourceProvider reportResourcesPro)</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.Web.Viewer.IReportResourceProvider.html">IReportResourceProvider</a></td>
      <td><span class="parametername">reportResourcesPro</span></td>
      <td><p>A <a class="xref" href="GrapeCity.ActiveReports.Web.Viewer.IReportResourceProvider.html">IReportResourceProvider</a> object representing the custom resource store provider.</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.Web.Viewer.ReportViewerConfiguration.html">ReportViewerConfiguration</a></td>
      <td><p>The current <a class="xref" href="GrapeCity.ActiveReports.Web.Viewer.ReportViewerConfiguration.html">ReportViewerConfiguration</a> instance.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Web_Viewer_ReportViewerConfiguration_UseResourceProvider_GrapeCity_ActiveReports_Web_Viewer_IReportResourceProvider__examples">Examples</h5>
<pre><code class="lang-csharp">app.UseReportViewer(config =&gt;
{
	// Your implementation of IReportResourceProvider.
	config.UseResourceProvider(reportResourcesPro);
});</code></pre>

<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></td>
      <td><p>Thrown if <code class="paramref">reportResourcesPro</code> is <code>null</code>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_ActiveReports_Web_Viewer_ReportViewerConfiguration_UseResourceProvider_" data-uid="GrapeCity.ActiveReports.Web.Viewer.ReportViewerConfiguration.UseResourceProvider*"></a>
<h4 id="GrapeCity_ActiveReports_Web_Viewer_ReportViewerConfiguration_UseResourceProvider_GrapeCity_ActiveReports_Web_Viewer_GetResourceFn_" data-uid="GrapeCity.ActiveReports.Web.Viewer.ReportViewerConfiguration.UseResourceProvider(GrapeCity.ActiveReports.Web.Viewer.GetResourceFn)">UseResourceProvider(GetResourceFn)</h4>
<div class="markdown level1 summary"><p>Uses a custom resource store provider.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public ReportViewerConfiguration UseResourceProvider(GetResourceFn getResource)</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.Web.Viewer.GetResourceFn.html">GetResourceFn</a></td>
      <td><span class="parametername">getResource</span></td>
      <td><p>A delegate <a class="xref" href="GrapeCity.ActiveReports.Web.Viewer.GetResourceFn.html">GetResourceFn</a> that retrieves
the resource based on the specified resource information</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.Web.Viewer.ReportViewerConfiguration.html">ReportViewerConfiguration</a></td>
      <td><p>The current <a class="xref" href="GrapeCity.ActiveReports.Web.Viewer.ReportViewerConfiguration.html">ReportViewerConfiguration</a> instance.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Web_Viewer_ReportViewerConfiguration_UseResourceProvider_GrapeCity_ActiveReports_Web_Viewer_GetResourceFn__examples">Examples</h5>
<pre><code class="lang-csharp">Stream GetResource(ResourceInfo resource)
{
	// Your implementation of getting a resource.
}

app.UseReportViewer(config =&gt;
{
	config.UseResourceProvider(GetResource);
});</code></pre>

<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></td>
      <td><p>Thrown if <code class="paramref">getResource</code> is <code>null</code>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
