# GrapeCity.ActiveReports.Document.PageDocument.SaveSnapshot

## Content

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



<h1 id="GrapeCity_ActiveReports_Document_PageDocument_SaveSnapshot_" data-uid="GrapeCity.ActiveReports.Document.PageDocument.SaveSnapshot*">SaveSnapshot Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Document_PageDocument_SaveSnapshot_" data-uid="GrapeCity.ActiveReports.Document.PageDocument.SaveSnapshot*"></a>
<h4 id="GrapeCity_ActiveReports_Document_PageDocument_SaveSnapshot_System_IO_FileInfo_" data-uid="GrapeCity.ActiveReports.Document.PageDocument.SaveSnapshot(System.IO.FileInfo)">SaveSnapshot(FileInfo)</h4>
<div class="markdown level1 summary"><p>Saves the document snapshot with aids the specified file info.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SaveSnapshot(FileInfo snapshotFile)</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">snapshotFile</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.fileinfo">FileInfo</a> object to aids in the creation of <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.filestream">FileStream</a>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_ActiveReports_Document_PageDocument_SaveSnapshot_" data-uid="GrapeCity.ActiveReports.Document.PageDocument.SaveSnapshot*"></a>
<h4 id="GrapeCity_ActiveReports_Document_PageDocument_SaveSnapshot_System_IO_Stream_System_Boolean_" data-uid="GrapeCity.ActiveReports.Document.PageDocument.SaveSnapshot(System.IO.Stream,System.Boolean)">SaveSnapshot(Stream, bool)</h4>
<div class="markdown level1 summary"><p>Saves the document snapshot to the specified output 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 SaveSnapshot(Stream snapshotStream, bool isInteractive = false)</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">snapshotStream</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a> object to which the snapshot will be written.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">isInteractive</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value indicating report has interactive items like user sorts.
If <code>true</code>, the data aggregate tree is preserved for interactive items and written to the stream;
if <code>false</code>, the data aggregate tree is reset and excluded from the output. The default value is <code>false</code>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Document_PageDocument_SaveSnapshot_System_IO_Stream_System_Boolean__examples">Examples</h5>
<pre><code class="lang-csharp">// Saving a report snapshot to the file.
string path = System.IO.Path.Combine(rootPath, "SampleSnapshotFile.rdlx-snap");

using (var fs = new FileStream(path, FileMode.Create)
{
	pageReport.Document.SaveSnapshot(fs);
}</code></pre>



<a id="GrapeCity_ActiveReports_Document_PageDocument_SaveSnapshot_" data-uid="GrapeCity.ActiveReports.Document.PageDocument.SaveSnapshot*"></a>
<h4 id="GrapeCity_ActiveReports_Document_PageDocument_SaveSnapshot_System_IO_Stream_System_Boolean_System_Boolean_" data-uid="GrapeCity.ActiveReports.Document.PageDocument.SaveSnapshot(System.IO.Stream,System.Boolean,System.Boolean)">SaveSnapshot(Stream, bool, bool)</h4>
<div class="markdown level1 summary"><p>Saves the document snapshot to the specified output 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 SaveSnapshot(Stream snapshotStream, bool isInteractive, bool formatted)</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">snapshotStream</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a> object to which the snapshot will be written.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">isInteractive</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value indicating report has interactive items like user sorts.
If <code>true</code>, the data aggregate tree is preserved for interactive items and written to the stream;
if <code>false</code>, the data aggregate tree is reset and excluded from the output.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">formatted</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value indicating whether the JSON should be formatted for readability.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_Document_PageDocument_SaveSnapshot_System_IO_Stream_System_Boolean_System_Boolean__examples">Examples</h5>
<pre><code class="lang-csharp">// Saving a formatted non-interactive report snapshot to the file.
string path = System.IO.Path.Combine(rootPath, "SampleSnapshotFile.rdlx-snap");

using (var fs = new FileStream(path, FileMode.Create)
{
	pageReport.Document.SaveSnapshot(fs, false, true);
}</code></pre>

</div>
