ReportClientDocument Object Model (RAS)

The ReportClientDocument object model provides the most powerful and extensive object model for manipulating reports. This object model is only available as part of a Report Application Server (RAS), which is available either as an unmanaged Report Application Server (RAS), or as a managed Report Application Server (BOE).

The ReportClientDocument object model is made up of many classes across several namespaces. Each namespace is prefixed with CrystalDecisions.ReportAppServer. This object model exposes the entire report structure in the SDK, to enable you to programmatically create, modify, and save changes to every aspect of the report at runtime.

An instance of ReportClientDocument comprises a report that can be modified programmatically by its class properties. These properties are linked to a series of other libraries in the SDK that contain controllers, data definition models, and report definition models:

  • ReportDefinition corresponds to the layout of the report, as shown in the Crystal Reports Designer.
  • DataDefinition corresponds to the field explorer in the Crystal Reports Designer.
  • RowsetController corresponds to the processed data values of each detail row, when viewing the report at run time.

ReportClientDocument instances may be instantiations of either:

  • An existing .rpt file that has been loaded from a directory, and then modified with the report definition and data definition classes of the ReportClientDocument SDK.
  • A completely new, empty report that is constructed with the report definition and data definition classes of the ReportClientDocument SDK.

This ReportClientDocument class instance may be loaded only long enough to pass the instance to the viewer for display, before it passes out of scope. However, the class instance may also be modified, and then saved as a report (.rpt) to a directory with one of the controller classes.

For detailed information on the ReportClientDocument Object Model, consult the Business Objects RAS .NET SDK documentation.

ReportClientDocument in Crystal Reports 9

Crystal Reports 9 (Advanced version) shipped with unmanaged RAS and the RAS .NET assemblies required to program to the ReportClientDocument object model. That allowed developers to create .NET projects that took advantage of the ReportClientDocument object model.

However, it also meant that projects that were previously created with the ReportDocument object model that was provided with Crystal Reports had to be completely recoded for the ReportClientDocument object model that is provided with RAS. The reason for that was the two object models were completely separate.

ReportClientDocument in Crystal Reports 10 and up

In Crystal Reports 10, the fundamental separation between object models was removed. This has been done by rewriting the ReportDocument object model to function as a proxy to (a subset of) functionality from the ReportClientDocument object model. The classes of the ReportDocument object model expose the same property and method signatures as before, but the underlying functionality is changed to redirect each property and method to properties and methods of the more powerful ReportClientDocument object model.

This does not mean that a basic version of Crystal Reports Developer gains full access to an unmanaged RAS server or to the ReportClientDocument object model. The basic version of Crystal Reports continues to access only the ReportDocument object model (even though the ReportDocument object model functions as proxy to a subset of the ReportClientDocument object model). The original reporting engine contained in previous versions of Crystal Reports has been replaced with a limited and embedded version of the RAS reporting engine.

You install and gain direct access to the ReportClientDocument model only with an upgraded license to the unmanaged RAS server. At that point all existing code that is written for the ReportDocument object model can be easily redirected to the separate RAS server, by setting two properties on any given report instance, and the underlying ReportClientDocument object model can now be accessed directly, when you retrieve it from the ReportClientDocument property of the ReportDocument class.

For more information, see Binding to Unmanaged RAS Using ReportDocument.Load() Method.

ReportClientDocument Object Model Diagram

This diagram shows the relationships of the ReportClientDocument object model.

Figure 4: ReportClientDocument Object Model