# GrapeCity.ActiveReports.Rendering.Tools.DataSourceTools.LoadSharedDataSource

## Content

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



<h1 id="GrapeCity_ActiveReports_Rendering_Tools_DataSourceTools_LoadSharedDataSource_" data-uid="GrapeCity.ActiveReports.Rendering.Tools.DataSourceTools.LoadSharedDataSource*">LoadSharedDataSource Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Rendering_Tools_DataSourceTools_LoadSharedDataSource_" data-uid="GrapeCity.ActiveReports.Rendering.Tools.DataSourceTools.LoadSharedDataSource*"></a>
<h4 id="GrapeCity_ActiveReports_Rendering_Tools_DataSourceTools_LoadSharedDataSource_System_String_" data-uid="GrapeCity.ActiveReports.Rendering.Tools.DataSourceTools.LoadSharedDataSource(System.String)">LoadSharedDataSource(string)</h4>
<div class="markdown level1 summary"><p>Loads a shared data source from the specified file path.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static DataSource LoadSharedDataSource(string filePath)</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">filePath</span></td>
      <td><p>The path to the .rdsx file.</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="../MESCIUS.ActiveReports.Core.Rdl/GrapeCity.ActiveReports.PageReportModel.DataSource.html">DataSource</a></td>
      <td><p>The loaded <a class="xref" href="../MESCIUS.ActiveReports.Core.Rdl/GrapeCity.ActiveReports.PageReportModel.DataSource.html">DataSource</a>.</p>
</td>
    </tr>
  </tbody>
</table>
<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.io.filenotfoundexception">FileNotFoundException</a></td>
      <td><p>Thrown if the file does not exist.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_ActiveReports_Rendering_Tools_DataSourceTools_LoadSharedDataSource_" data-uid="GrapeCity.ActiveReports.Rendering.Tools.DataSourceTools.LoadSharedDataSource*"></a>
<h4 id="GrapeCity_ActiveReports_Rendering_Tools_DataSourceTools_LoadSharedDataSource_System_IO_Stream_" data-uid="GrapeCity.ActiveReports.Rendering.Tools.DataSourceTools.LoadSharedDataSource(System.IO.Stream)">LoadSharedDataSource(Stream)</h4>
<div class="markdown level1 summary"><p>Loads a shared data source from the specified XML stream.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static DataSource LoadSharedDataSource(Stream sharedDataSource)</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.io.stream">Stream</a></td>
      <td><span class="parametername">sharedDataSource</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a> containing the XML data of the shared data source.</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="../MESCIUS.ActiveReports.Core.Rdl/GrapeCity.ActiveReports.PageReportModel.DataSource.html">DataSource</a></td>
      <td><p>The loaded <a class="xref" href="../MESCIUS.ActiveReports.Core.Rdl/GrapeCity.ActiveReports.PageReportModel.DataSource.html">DataSource</a>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_ActiveReports_Rendering_Tools_DataSourceTools_LoadSharedDataSource_" data-uid="GrapeCity.ActiveReports.Rendering.Tools.DataSourceTools.LoadSharedDataSource*"></a>
<h4 id="GrapeCity_ActiveReports_Rendering_Tools_DataSourceTools_LoadSharedDataSource_GrapeCity_ActiveReports_ResourceLocator_System_String_" data-uid="GrapeCity.ActiveReports.Rendering.Tools.DataSourceTools.LoadSharedDataSource(GrapeCity.ActiveReports.ResourceLocator,System.String)">LoadSharedDataSource(ResourceLocator, string)</h4>
<div class="markdown level1 summary"><p>Loads a shared data source using the specified resource locator and data source reference.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static DataSource LoadSharedDataSource(ResourceLocator resourceLocator, string dataSourceReference)</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="../MESCIUS.ActiveReports.Core.Rdl/GrapeCity.ActiveReports.ResourceLocator.html">ResourceLocator</a></td>
      <td><span class="parametername">resourceLocator</span></td>
      <td><p>The <a class="xref" href="../MESCIUS.ActiveReports.Core.Rdl/GrapeCity.ActiveReports.ResourceLocator.html">ResourceLocator</a> instance.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">dataSourceReference</span></td>
      <td><p>The reference string of the shared data source.</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="../MESCIUS.ActiveReports.Core.Rdl/GrapeCity.ActiveReports.PageReportModel.DataSource.html">DataSource</a></td>
      <td><p>The loaded <a class="xref" href="../MESCIUS.ActiveReports.Core.Rdl/GrapeCity.ActiveReports.PageReportModel.DataSource.html">DataSource</a>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
