# C1.Report.FlexReport.Save

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Report_FlexReport_Save_" data-uid="C1.Report.FlexReport.Save*">Save Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Report_FlexReport_Save_" data-uid="C1.Report.FlexReport.Save*"></a>
<h4 id="C1_Report_FlexReport_Save_System_String_" data-uid="C1.Report.FlexReport.Save(System.String)">Save(string)</h4>
<div class="markdown level1 summary"><p>Saves the current report definition to a 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 Save(string fileName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(fileName 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 file to be created (if the file already exists, it will be overwritten).</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Report_FlexReport_Save_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method does not embed pictures and subreports into the output file. It only saves subreport names and saves
images in external files.</p>
</div>


<a id="C1_Report_FlexReport_Save_" data-uid="C1.Report.FlexReport.Save*"></a>
<h4 id="C1_Report_FlexReport_Save_System_String_System_Boolean_C1_Report_FontEmbedType_" data-uid="C1.Report.FlexReport.Save(System.String,System.Boolean,C1.Report.FontEmbedType)">Save(string, bool, FontEmbedType)</h4>
<div class="markdown level1 summary"><p>Saves the current report definition to a 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 Save(string fileName, bool embedAll, FontEmbedType embedFonts = FontEmbedType.None)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(fileName As String, embedAll As Boolean, Optional embedFonts As FontEmbedType = FontEmbedType.None)</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 file to be created (if the file already exists, it will be overwritten).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">embedAll</span></td>
      <td><p>Whether to embed images and subreports into the output file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Report.FontEmbedType.html">FontEmbedType</a></td>
      <td><span class="parametername">embedFonts</span></td>
      <td><p>Whether and how to embed fonts into the output file.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Report_FlexReport_Save_" data-uid="C1.Report.FlexReport.Save*"></a>
<h4 id="C1_Report_FlexReport_Save_System_String_System_Boolean_System_Boolean_System_Boolean_C1_Report_FontEmbedType_" data-uid="C1.Report.FlexReport.Save(System.String,System.Boolean,System.Boolean,System.Boolean,C1.Report.FontEmbedType)">Save(string, bool, bool, bool, FontEmbedType)</h4>
<div class="markdown level1 summary"><p>Saves the current report definition to a 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 Save(string fileName, bool embedImages, bool embedSubReports, bool saveAll = false, FontEmbedType embedFonts = FontEmbedType.None)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(fileName As String, embedImages As Boolean, embedSubReports As Boolean, Optional saveAll As Boolean = False, Optional embedFonts As FontEmbedType = FontEmbedType.None)</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 file to be created (if the file already exists, it will be overwritten).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">embedImages</span></td>
      <td><p>Whether to embed images into the output file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">embedSubReports</span></td>
      <td><p>Whether to embed subreports into the output file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">saveAll</span></td>
      <td><p>Save all reports.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Report.FontEmbedType.html">FontEmbedType</a></td>
      <td><span class="parametername">embedFonts</span></td>
      <td><p>Whether and how to embed fonts into the output file.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Report_FlexReport_Save_" data-uid="C1.Report.FlexReport.Save*"></a>
<h4 id="C1_Report_FlexReport_Save_System_IO_Stream_System_Boolean_System_Boolean_System_Boolean_C1_Report_FontEmbedType_" data-uid="C1.Report.FlexReport.Save(System.IO.Stream,System.Boolean,System.Boolean,System.Boolean,C1.Report.FontEmbedType)">Save(Stream, bool, bool, bool, FontEmbedType)</h4>
<div class="markdown level1 summary"><p>Saves the current report definition to a 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 Save(Stream stream, bool embedImages, bool embedSubReports, bool saveAll = false, FontEmbedType embedFonts = FontEmbedType.None)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(stream As Stream, embedImages As Boolean, embedSubReports As Boolean, Optional saveAll As Boolean = False, Optional embedFonts As FontEmbedType = FontEmbedType.None)</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 to save to.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">embedImages</span></td>
      <td><p>Indicates whether to embed images into the output stream.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">embedSubReports</span></td>
      <td><p>Indicates whether to embed subreports into the output stream.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">saveAll</span></td>
      <td><p>Save all reports.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Report.FontEmbedType.html">FontEmbedType</a></td>
      <td><span class="parametername">embedFonts</span></td>
      <td><p>Indicates how to embed fonts into the output stream.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Report_FlexReport_Save_" data-uid="C1.Report.FlexReport.Save*"></a>
<h4 id="C1_Report_FlexReport_Save_System_Xml_XmlWriter_" data-uid="C1.Report.FlexReport.Save(System.Xml.XmlWriter)">Save(XmlWriter)</h4>
<div class="markdown level1 summary"><p>Saves the current report definition to an <span class="xref">System.Xml.XmlWriter</span> object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Save(XmlWriter writer)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(writer As XmlWriter)</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>An <span class="xref">System.Xml.XmlWriter</span> object where the report definition will be saved.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Report_FlexReport_Save_System_Xml_XmlWriter__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method does not embed pictures and subreports into the output file.</p>
</div>


<a id="C1_Report_FlexReport_Save_" data-uid="C1.Report.FlexReport.Save*"></a>
<h4 id="C1_Report_FlexReport_Save_System_Xml_XmlWriter_System_Boolean_C1_Report_FontEmbedType_" data-uid="C1.Report.FlexReport.Save(System.Xml.XmlWriter,System.Boolean,C1.Report.FontEmbedType)">Save(XmlWriter, bool, FontEmbedType)</h4>
<div class="markdown level1 summary"><p>Saves the current report definition to an XmlWriter object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Save(XmlWriter writer, bool embed, FontEmbedType embedFonts = FontEmbedType.None)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(writer As XmlWriter, embed As Boolean, Optional embedFonts As FontEmbedType = FontEmbedType.None)</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>An <span class="xref">System.Xml.XmlWriter</span> object where the report definition will be saved.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">embed</span></td>
      <td><p>Whether to embed images and subreports into the output stream.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Report.FontEmbedType.html">FontEmbedType</a></td>
      <td><span class="parametername">embedFonts</span></td>
      <td><p>Indicates how to embed fonts into the output stream.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Report_FlexReport_Save_" data-uid="C1.Report.FlexReport.Save*"></a>
<h4 id="C1_Report_FlexReport_Save_System_Xml_XmlWriter_System_Boolean_System_Boolean_C1_Report_FontEmbedType_" data-uid="C1.Report.FlexReport.Save(System.Xml.XmlWriter,System.Boolean,System.Boolean,C1.Report.FontEmbedType)">Save(XmlWriter, bool, bool, FontEmbedType)</h4>
<div class="markdown level1 summary"><p>Saves the current report definition to an XmlWriter object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Save(XmlWriter writer, bool embedImages, bool embedSubReports, FontEmbedType embedFonts = FontEmbedType.None)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Save(writer As XmlWriter, embedImages As Boolean, embedSubReports As Boolean, Optional embedFonts As FontEmbedType = FontEmbedType.None)</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>An <span class="xref">System.Xml.XmlWriter</span> object where the report definition will be saved.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">embedImages</span></td>
      <td><p>Whether to embed images into the output stream.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">embedSubReports</span></td>
      <td><p>Whether to embed subreports into the output stream.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Report.FontEmbedType.html">FontEmbedType</a></td>
      <td><span class="parametername">embedFonts</span></td>
      <td><p>Whether and how to embed fonts into the output stream.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
