# GrapeCity.ActiveReports.SectionReport.SaveLayout

## Content

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



<h1 id="GrapeCity_ActiveReports_SectionReport_SaveLayout_" data-uid="GrapeCity.ActiveReports.SectionReport.SaveLayout*">SaveLayout Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_SectionReport_SaveLayout_" data-uid="GrapeCity.ActiveReports.SectionReport.SaveLayout*"></a>
<h4 id="GrapeCity_ActiveReports_SectionReport_SaveLayout_System_Xml_XmlWriter_" data-uid="GrapeCity.ActiveReports.SectionReport.SaveLayout(System.Xml.XmlWriter)">SaveLayout(XmlWriter)</h4>
<div class="markdown level1 summary"><p>Saves the report layout to the provided <span class="xref">System.Xml.XmlWriter</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 SaveLayout(XmlWriter writer)</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">XmlWriter</span></td>
      <td><span class="parametername">writer</span></td>
      <td><p>The object where the layout will be saved.</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="GrapeCity.ActiveReports.ReportException.html">ReportException</a></td>
      <td><p>Thrown if the <code class="paramref">writer</code> is <code>null</code>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception">Exception</a></td>
      <td><p>Thrown if duplicate names are found in the report structure.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_ActiveReports_SectionReport_SaveLayout_" data-uid="GrapeCity.ActiveReports.SectionReport.SaveLayout*"></a>
<h4 id="GrapeCity_ActiveReports_SectionReport_SaveLayout_System_String_" data-uid="GrapeCity.ActiveReports.SectionReport.SaveLayout(System.String)">SaveLayout(string)</h4>
<div class="markdown level1 summary"><p>Saves layout to the file in the<a class="xref" href="GrapeCity.ActiveReports.SectionReport.RpxFormat.html#GrapeCity_ActiveReports_SectionReport_RpxFormat_Arnet">Arnet</a> format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Obsolete(&quot;This method has been deprecated. Please, use SaveLayout(XmlWriter) method instead&quot;)]
public void SaveLayout(string fileName)</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>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a> value representing the name of the file in which the layout is to be saved.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_ActiveReports_SectionReport_SaveLayout_" data-uid="GrapeCity.ActiveReports.SectionReport.SaveLayout*"></a>
<h4 id="GrapeCity_ActiveReports_SectionReport_SaveLayout_System_IO_Stream_" data-uid="GrapeCity.ActiveReports.SectionReport.SaveLayout(System.IO.Stream)">SaveLayout(Stream)</h4>
<div class="markdown level1 summary"><p>Saves the report layout to the specified stream in the <a class="xref" href="GrapeCity.ActiveReports.SectionReport.RpxFormat.html#GrapeCity_ActiveReports_SectionReport_RpxFormat_Arnet">Arnet</a> format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Obsolete(&quot;This method has been deprecated. Please, use SaveLayout(XmlWriter) method instead&quot;)]
public void SaveLayout(Stream stream)</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>The stream where the layout will be saved.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
