# GrapeCity.ActiveReports.PageReport.Load

## Content

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



<h1 id="GrapeCity_ActiveReports_PageReport_Load_" data-uid="GrapeCity.ActiveReports.PageReport.Load*">Load Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_PageReport_Load_" data-uid="GrapeCity.ActiveReports.PageReport.Load*"></a>
<h4 id="GrapeCity_ActiveReports_PageReport_Load_System_IO_FileInfo_" data-uid="GrapeCity.ActiveReports.PageReport.Load(System.IO.FileInfo)">Load(FileInfo)</h4>
<div class="markdown level1 summary"><p>Loads the report definition file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Load(FileInfo reportDefinitionFile)</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.fileinfo">FileInfo</a></td>
      <td><span class="parametername">reportDefinitionFile</span></td>
      <td><p>Information about a file path.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PageReport_Load_System_IO_FileInfo__examples">Examples</h5>
<pre><code class="lang-csharp">PageReport pr = new PageReport();
FileInfo fInfo = new FileInfo("AnnualReport.rdlx");
pr.Load(fInfo);</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="../MESCIUS.ActiveReports.Core.Rdl/GrapeCity.ActiveReports.Rdl.Persistence.PersistenceException.html">PersistenceException</a></td>
      <td><p>Thrown if the report definition cannot be loaded.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.ActiveReports.ReportException.html">ReportException</a></td>
      <td><p>Thrown if the specified file does not appear to be a properly formatted RDLX file, or if the report definition has the wrong xmlns specified.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_ActiveReports_PageReport_Load_" data-uid="GrapeCity.ActiveReports.PageReport.Load*"></a>
<h4 id="GrapeCity_ActiveReports_PageReport_Load_System_IO_TextReader_" data-uid="GrapeCity.ActiveReports.PageReport.Load(System.IO.TextReader)">Load(TextReader)</h4>
<div class="markdown level1 summary"><p>Loads the report definition file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Load(TextReader reportDefinitionReader)</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.textreader">TextReader</a></td>
      <td><span class="parametername">reportDefinitionReader</span></td>
      <td><p>The reader to access the content of the report.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PageReport_Load_System_IO_TextReader__examples">Examples</h5>
<pre><code class="lang-csharp">using (StreamReader sr = new StreamReader(path))
{
PageReport report = new PageReport();
report.Load(sr);
}</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="../MESCIUS.ActiveReports.Core.Rdl/GrapeCity.ActiveReports.Rdl.Persistence.PersistenceException.html">PersistenceException</a></td>
      <td><p>Thrown if the report definition cannot be loaded.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.ActiveReports.ReportException.html">ReportException</a></td>
      <td><p>Thrown if the specified file does not appear to be a properly formatted RDLX file, or if the report definition has the wrong xmlns specified.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
