[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Document.PageDocument.SaveSnapshot

SaveSnapshot Method

SaveSnapshot(FileInfo)

Saves the document snapshot with aids the specified file info.

Declaration
public void SaveSnapshot(FileInfo snapshotFile)
Parameters
Type Name Description
FileInfo snapshotFile

A FileInfo object to aids in the creation of FileStream.

SaveSnapshot(Stream, bool)

Saves the document snapshot to the specified output stream.

Declaration
public void SaveSnapshot(Stream snapshotStream, bool isInteractive = false)
Parameters
Type Name Description
Stream snapshotStream

A Stream object to which the snapshot will be written.

bool isInteractive

A bool value indicating report has interactive items like user sorts. If true, the data aggregate tree is preserved for interactive items and written to the stream; if false, the data aggregate tree is reset and excluded from the output. The default value is false.

Examples
// 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);
}

SaveSnapshot(Stream, bool, bool)

Saves the document snapshot to the specified output stream.

Declaration
public void SaveSnapshot(Stream snapshotStream, bool isInteractive, bool formatted)
Parameters
Type Name Description
Stream snapshotStream

A Stream object to which the snapshot will be written.

bool isInteractive

A bool value indicating report has interactive items like user sorts. If true, the data aggregate tree is preserved for interactive items and written to the stream; if false, the data aggregate tree is reset and excluded from the output.

bool formatted

A bool value indicating whether the JSON should be formatted for readability.

Examples
// 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);
}