7.1. Storing and Loading a Report

You may store a report in the following ways:

In the .FRX file

To load the report from a file, use the Load method of the Report object:


In the database

You may store a report in the database, either as a string or in a blob-stream. To load the report from a string, use the LoadFromString method of the Report object. To load the report from a stream, use the overloaded version of the Load method:


As a C#/VB.NET class

To work with a report as a class, design your report and save in to the .cs/.vb file. To do this, select “file type” in the “Save” dialog. The file type maybe either .cs or .vb - it depends on the script language in the report (it may be changed in the “Report|Options…” menu). Include that file into your project. This method has the following Pros:

and Cons:

To work with a report, create an instance of the report’s class:

SimpleListReport report = new SimpleListReport();

Using the Report Top Page Running a Report