[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Document.PageDocument.LoadSnapshot

LoadSnapshot Method

LoadSnapshot(FileInfo)

Loads a page document with aids the specified file info.

Declaration
public static PageDocument LoadSnapshot(FileInfo snapshotFile)
Parameters
Type Name Description
FileInfo snapshotFile

A FileInfo object to aids in the creation of FileStream.

Returns
Type Description
PageDocument

LoadSnapshot(Stream, ResourceLocator)

Loads a page document snapshot from the specified stream, verifying its digital signature and version compatibility.

Declaration
public static PageDocument LoadSnapshot(Stream snapshotStream, ResourceLocator resourceLocator = null)
Parameters
Type Name Description
Stream snapshotStream

The Stream object containing the serialized document snapshot data.

ResourceLocator resourceLocator

An ResourceLocator object used to resolve external resources referenced in the document. The default is null.

Returns
Type Description
PageDocument

A PageDocument instance representing the page documet that loaded from snapshot.

Examples
// Loading a page document from the snapshot.
string path = System.IO.Path.Combine(rootPath, "SampleSnapshotFile.rdlx-snap");

using (var fs = new FileStream(path, FileMode.Open)
{
	 PageDocument document = PageDocument.LoadSnapshot(fs, new SampleResourceLocator());
}
Exceptions
Type Condition
InvalidDataException

Thrown if the digital signature is invalid or the snapshot version is not supported.