Object Models

Crystal Reports for Visual Studio provides an SDK that contains two object models. With additional licensing, the SDK expands to contain four object models.

The controls for the report viewer provide the entry point into the SDK, (see Report Viewer Controls). That is because the report viewer displays reports by binding to a report object; all object models in the SDK expose and manipulate report objects.

Each object model provides increasing levels of power and complexity:

-

The simplest object model is CrystalReportViewer. See [CrystalReportViewer Object Model](ms225258\(v=vs.90\).md).

The CrystalReportViewer control in the Web or Windows Form has, by definition, an underlying class of the same name. This CrystalReportViewer class exposes properties and methods for modifying the control's display functionality, and for interacting with classes that manage database logons, parameters, and selection formulas. This set of classes is the simplest object model. The CrystalReportViewer class exists in two different forms: one in a Windows namespace and one in a Web namespace. Therefore, many elements of this object model are duplicated in both namespaces, with some variations to support the differences in the Windows and Web platforms.


> [!NOTE]
> <P>For more information on how to select an object model, see <A href="ms225524(v=vs.90).md">Choose the Correct Object Model for Your Project</A>.</P>


The classes of this object model are contained within the CrystalDecisions.Web namespace for the Web Form version of this control or the CrystalDecisions.Windows.Forms namespace for the Windows Form version of this control.
  • A more extensive object model is ReportDocument. See ReportDocument Object Model.

    The ReportDocument class is a gateway to a set of classes in the Engine namespace, including Database, DataDefinition, ExportOptions, PrintOptions, ReportDefinition, ReportOptions, and SummaryInfo. This is an extensive set of classes that provide more powerful customization and interaction capability with the report.

    The classes of this object model are contained within the CrystalDecisions.CrystalReports.Engine namespace.

  • The following object models are available by upgrade:

    • An object model with greater report modification capability, named ReportClientDocument. See ReportClientDocument Object Model (RAS).

      This class functions as gateway to a much larger object model that is made up of many classes across several namespaces. It exposes the entire report structure through the SDK, so that you can create or modify every aspect of the report programmatically at runtime.

      The classes of this object model are contained within the CrystalDecisions.ReportAppServer group of namespaces.

      The ReportClientDocument object model is provided with a Report Application Server (RAS), for which additional licensing is required. See Upgrading Business Objects Reporting Solutions. A Report Application Server is available with Crystal Reports Server and BusinessObjects Enterprise.

      Note

      The ReportClientDocument object model is available with Crystal Reports 2008.

    • An extensive object model for interacting with the enterprise level functions of Crystal Reports Server or BusinessObjects Enterprise, named InfoObject. See InfoObject Object Model (BOE). It is provided with the Crystal Reports Server or BusinessObjects Enterprise license.

      This class functions as a gateway to the full Enterprise object model of Crystal Reports Server or BusinessObjects Enterprise.

      The classes of this object model are contained within the CrystalDecisions.Enterprise group of namespaces.

      Note

      The InfoObject object model is provided only with Crystal Reports Server and BusinessObjects Enterprise, for which additional licensing is required. See Report Application Server (RAS).

In this section:

See Also