# C1.Report.FlexReport.Load

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Report_FlexReport_Load_" data-uid="C1.Report.FlexReport.Load*">Load Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Report_FlexReport_Load_" data-uid="C1.Report.FlexReport.Load*"></a>
<h4 id="C1_Report_FlexReport_Load_System_String_" data-uid="C1.Report.FlexReport.Load(System.String)">Load(string)</h4>
<div class="markdown level1 summary"><p>Load report.</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(string reportName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Load(reportName As String)</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">reportName</span></td>
      <td></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.exception">Exception</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Report_FlexReport_Load_" data-uid="C1.Report.FlexReport.Load*"></a>
<h4 id="C1_Report_FlexReport_Load_System_IO_Stream_System_String_System_Boolean__" data-uid="C1.Report.FlexReport.Load(System.IO.Stream,System.String,System.Boolean@)">Load(Stream, string, out bool)</h4>
<div class="markdown level1 summary"><p>Loads a report from an XML report definition in stream.</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(Stream stream, string reportName, out bool converted)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Load(stream As Stream, reportName As String, ByRef converted As Boolean)</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">stream</span></td>
      <td><p>Stream containing XML report definition.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">reportName</span></td>
      <td><p>Name of the report to retrieve from the file (case-insensitive).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">converted</span></td>
      <td><p>OUT: Contains true if report definition was imported from old C1Report format.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Report_FlexReport_Load_System_IO_Stream_System_String_System_Boolean___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>You can get a list of reports available in the file using the <a class="xref" href="C1.Report.FlexReport.GetReportList.html#C1_Report_FlexReport_GetReportList_System_IO_Stream_">GetReportList(Stream)</a> method.</p>
</div>


<a id="C1_Report_FlexReport_Load_" data-uid="C1.Report.FlexReport.Load*"></a>
<h4 id="C1_Report_FlexReport_Load_System_IO_Stream_System_String_" data-uid="C1.Report.FlexReport.Load(System.IO.Stream,System.String)">Load(Stream, string)</h4>
<div class="markdown level1 summary"><p>Loads a report from an XML report definition in stream.</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(Stream stream, string reportName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Load(stream As Stream, reportName As String)</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">stream</span></td>
      <td><p>Stream containing XML report definition.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">reportName</span></td>
      <td><p>Name of the report to retrieve from the file (case-insensitive).</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Report_FlexReport_Load_System_IO_Stream_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>You can get a list of reports available in the file using the <a class="xref" href="C1.Report.FlexReport.GetReportList.html#C1_Report_FlexReport_GetReportList_System_IO_Stream_">GetReportList(Stream)</a> method.</p>
</div>


<a id="C1_Report_FlexReport_Load_" data-uid="C1.Report.FlexReport.Load*"></a>
<h4 id="C1_Report_FlexReport_Load_System_String_System_String_System_Boolean__" data-uid="C1.Report.FlexReport.Load(System.String,System.String,System.Boolean@)">Load(string, string, out bool)</h4>
<div class="markdown level1 summary"><p>Loads a report from an XML 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(string fileName, string reportName, out bool converted)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Load(fileName As String, reportName As String, ByRef converted As Boolean)</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">fileName</span></td>
      <td><p>Full name of the XML report definition file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">reportName</span></td>
      <td><p>Name of the report to retrieve from the file (case-insensitive).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">converted</span></td>
      <td><p>OUT: Contains true if report definition was imported from old C1Report format.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Report_FlexReport_Load_System_String_System_String_System_Boolean___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>You can get a list of reports available in the file using the <a class="xref" href="C1.Report.FlexReport.GetReportList.html#C1_Report_FlexReport_GetReportList_System_String_">GetReportList(string)</a> method.</p>
</div>


<a id="C1_Report_FlexReport_Load_" data-uid="C1.Report.FlexReport.Load*"></a>
<h4 id="C1_Report_FlexReport_Load_System_String_System_String_" data-uid="C1.Report.FlexReport.Load(System.String,System.String)">Load(string, string)</h4>
<div class="markdown level1 summary"><p>Loads a report from an XML 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(string fileName, string reportName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Load(fileName As String, reportName As String)</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">fileName</span></td>
      <td><p>Full name of the XML report definition file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">reportName</span></td>
      <td><p>Name of the report to retrieve from the file (case-insensitive).</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Report_FlexReport_Load_System_String_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>You can get a list of reports available in the file using the <a class="xref" href="C1.Report.FlexReport.GetReportList.html#C1_Report_FlexReport_GetReportList_System_String_">GetReportList(string)</a> method.</p>
</div>


<a id="C1_Report_FlexReport_Load_" data-uid="C1.Report.FlexReport.Load*"></a>
<h4 id="C1_Report_FlexReport_Load_System_Xml_XmlDocument_System_String_System_Boolean__" data-uid="C1.Report.FlexReport.Load(System.Xml.XmlDocument,System.String,System.Boolean@)">Load(XmlDocument, string, out bool)</h4>
<div class="markdown level1 summary"><p>Loads a report from an <span class="xref">System.Xml.XmlDocument</span>.</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(XmlDocument doc, string reportName, out bool converted)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Load(doc As XmlDocument, reportName As String, ByRef converted As Boolean)</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><span class="xref">XmlDocument</span></td>
      <td><span class="parametername">doc</span></td>
      <td><p>The <span class="xref">System.Xml.XmlDocument</span> containing the 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">reportName</span></td>
      <td><p>The name of the report to load (case-insensitive), can be null in this case first report will be loaded.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">converted</span></td>
      <td><p>OUT: flag that is set to true if the loaded report definition was converted from the legacy C1Report format.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Report_FlexReport_Load_System_Xml_XmlDocument_System_String_System_Boolean___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>You can get a list of reports available in a file using the <a class="xref" href="C1.Report.FlexReport.GetReportList.html#C1_Report_FlexReport_GetReportList_System_Xml_XmlDocument_">GetReportList(XmlDocument)</a> method.</p>
</div>


<a id="C1_Report_FlexReport_Load_" data-uid="C1.Report.FlexReport.Load*"></a>
<h4 id="C1_Report_FlexReport_Load_System_Xml_XmlDocument_System_String_System_Boolean__System_Boolean_" data-uid="C1.Report.FlexReport.Load(System.Xml.XmlDocument,System.String,System.Boolean@,System.Boolean)">Load(XmlDocument, string, out bool, bool)</h4>
<div class="markdown level1 summary"><p>Loads a report from an <span class="xref">System.Xml.XmlDocument</span>.</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(XmlDocument doc, string reportName, out bool converted, bool loadAllReports)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Load(doc As XmlDocument, reportName As String, ByRef converted As Boolean, loadAllReports As Boolean)</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><span class="xref">XmlDocument</span></td>
      <td><span class="parametername">doc</span></td>
      <td><p>The <span class="xref">System.Xml.XmlDocument</span> containing the 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">reportName</span></td>
      <td><p>The name of the report to load (case-insensitive), can be null in this case first report will be loaded.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">converted</span></td>
      <td><p>OUT: flag that is set to true if the loaded report definition was converted from the legacy C1Report format.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">loadAllReports</span></td>
      <td><p>Load all reports from <span class="xref">System.Xml.XmlDocument</span> or just specified.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Report_FlexReport_Load_System_Xml_XmlDocument_System_String_System_Boolean__System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>You can get a list of reports available in a file using the <a class="xref" href="C1.Report.FlexReport.GetReportList.html#C1_Report_FlexReport_GetReportList_System_Xml_XmlDocument_">GetReportList(XmlDocument)</a> method.</p>
</div>


<a id="C1_Report_FlexReport_Load_" data-uid="C1.Report.FlexReport.Load*"></a>
<h4 id="C1_Report_FlexReport_Load_System_Xml_XmlDocument_System_String_" data-uid="C1.Report.FlexReport.Load(System.Xml.XmlDocument,System.String)">Load(XmlDocument, string)</h4>
<div class="markdown level1 summary"><p>Loads a report from an <span class="xref">System.Xml.XmlDocument</span>.</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(XmlDocument doc, string reportName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Load(doc As XmlDocument, reportName As String)</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><span class="xref">XmlDocument</span></td>
      <td><span class="parametername">doc</span></td>
      <td><p>Reference to the <span class="xref">System.Xml.XmlDocument</span> that contains the 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">reportName</span></td>
      <td><p>Name of the report to retrieve from the file (case-insensitive).</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Report_FlexReport_Load_System_Xml_XmlDocument_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>You can get a list of reports available in the file using the <a class="xref" href="C1.Report.FlexReport.GetReportList.html#C1_Report_FlexReport_GetReportList_System_Xml_XmlDocument_">GetReportList(XmlDocument)</a> method.</p>
</div>


<a id="C1_Report_FlexReport_Load_" data-uid="C1.Report.FlexReport.Load*"></a>
<h4 id="C1_Report_FlexReport_Load_System_Xml_Linq_XDocument_System_String_System_Boolean__" data-uid="C1.Report.FlexReport.Load(System.Xml.Linq.XDocument,System.String,System.Boolean@)">Load(XDocument, string, out bool)</h4>
<div class="markdown level1 summary"><p>Loads a report from an <span class="xref">System.Xml.Linq.XDocument</span>.</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(XDocument doc, string reportName, out bool converted)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Load(doc As XDocument, reportName As String, ByRef converted As Boolean)</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><span class="xref">XDocument</span></td>
      <td><span class="parametername">doc</span></td>
      <td><p>The <span class="xref">System.Xml.Linq.XDocument</span> containing the 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">reportName</span></td>
      <td><p>The name of the report to load (case-insensitive), can be null in this case first report will be loaded.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">converted</span></td>
      <td><p>OUT: flag that is set to true if the loaded report definition was converted from the legacy C1Report format.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Report_FlexReport_Load_System_Xml_Linq_XDocument_System_String_System_Boolean___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method updates <a class="xref" href="C1.Report.FlexReport.BasePath.html#C1_Report_FlexReport_BasePath">BasePath</a> property to the directory
from which the <code class="paramref">doc</code> was loaded.
You can get a list of reports available in a file using the <a class="xref" href="C1.Report.FlexReport.GetReportList.html#C1_Report_FlexReport_GetReportList_System_Xml_Linq_XDocument_">GetReportList(XDocument)</a> method.</p>
</div>


<a id="C1_Report_FlexReport_Load_" data-uid="C1.Report.FlexReport.Load*"></a>
<h4 id="C1_Report_FlexReport_Load_System_Xml_Linq_XDocument_System_String_" data-uid="C1.Report.FlexReport.Load(System.Xml.Linq.XDocument,System.String)">Load(XDocument, string)</h4>
<div class="markdown level1 summary"><p>Loads a report from an <span class="xref">System.Xml.Linq.XDocument</span>.</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(XDocument doc, string reportName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Load(doc As XDocument, reportName As String)</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><span class="xref">XDocument</span></td>
      <td><span class="parametername">doc</span></td>
      <td><p>Reference to the <span class="xref">System.Xml.XmlDocument</span> that contains the 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">reportName</span></td>
      <td><p>Name of the report to retrieve from the file (case-insensitive).</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Report_FlexReport_Load_System_Xml_Linq_XDocument_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>You can get a list of reports available in the file using the <a class="xref" href="C1.Report.FlexReport.GetReportList.html#C1_Report_FlexReport_GetReportList_System_Xml_Linq_XDocument_">GetReportList(XDocument)</a> method.</p>
</div>
</div>
