[]
        
(Showing Draft Content)

Working with Snapshots

An .rdlx-snap file is a rendered RDLX report containing the exact data captured at the moment of generation. Unlike an .rdlx report, the snapshot is fixed — the data will not change even if the source database is updated or removed. The key benefits of this format are:

  • Pre‑Rendered & Static. Data and layout are locked in, ensuring a consistent, unalterable record.

  • No Database Connection Required. You can view or export the snapshot without re‑querying the database. This is ideal for:

    • Archiving — Store historical reports, e.g., end‑of‑month financials.

    • Auditing — Provide immutable records to meet compliance requirements.

    • Performance — Complex reports open faster because rendering is already done.

    • Offline Access — Share reports with users who lack direct database access.

  • Layout Fidelity. Preserves exact pagination and formatting, critical for printing or producing PDF outputs that must match a specific template.

Saving Report as Snapshot

  1. Install the required MESCIUS.ActiveReports package via NuGet:

    • In Solution Explorer, right‑click your project and select Manage NuGet Packages

    • Search for and install MESCIUS.ActiveReports.

  2. Ensure you have access to an existing Page or RDLX report file (.rdlx) to snapshot.

  3. To save your Page/RDLX report to a snapshot, use the following code.

using System.IO;

var rptPath = @"C:\Temp\Report1.rdlx";
var rpt = new PageReport(new FileInfo(rptPath));

rpt.Run();
    
rpt.Document.SaveSnapshot(
    new FileInfo(@"C:\Temp\Report1.rdlx-snap")
);

Loading Report from Snapshot

  1. Install the required MESCIUS.ActiveReports package via NuGet:

    • In Solution Explorer, right‑click your project and select Manage NuGet Packages

    • Search for and install MESCIUS.ActiveReports.

  2. Ensure you have an .rdlx-snap file created with the SaveSnapshot method.

  3. To load your Page/RDLX report to a snapshot, use the following code.

using System.IO;

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()
    );
} 

Using Loaded Snapshot

Once your .rdlx-snap file is loaded, you can perform the same actions as you would with a freshly generated report — without reconnecting to the database or re-rendering.

  1. View the Snapshot in a Report Viewer

    You can display the loaded snapshot in any supported viewer:

  2. Export to Other Formats

    You can export snapshots (PDF, Word, Excel, etc.) without regenerating the report. For details, see Export Page / RDLX Reports.

  3. Print the Snapshot

    You can print directly, again without connecting to the data source. For details, see Print Reports.