Share via


Binding to Report Application Server (Crystal Reports 9 and up)

Note

This page describes functionality that is not available in Crystal Reports for Visual Studio, but is available in one of the upgraded versions. For more information about Crystal Reports for Visual Studio, see What is Crystal Reports for Visual Studio? For more information about upgraded versions, see Upgrade Options.

Object Model

This report binding scenario uses Report Binding with CrystalReportViewer Object Model.

Location of Reports

The report is located on the unmanaged RAS server (see Report Application Server (RAS)). The report is wrapped in the EnterpriseReportDocument class.

Crystal Services Overview

This report binding scenario applies to reports accessed from the Crystal Services server node in the Server Explorer.

Note

For an overview of Crystal Services, see Using Crystal Services.

This section examines the Report Application Server sub node of Crystal Services, within Crystal Reports 9.

[SERVERNAME]

  • Crystal Services
    • Report Application Server

Description

The Report Application Server sub node accesses and then displays reports that have been exposed by an unmanaged RAS server.

When you drag and drop a report from the Crystal Services>Report Application Server node onto a Web or Windows Form, an instance of EnterpriseReportDocument is generated. The EnterpriseReportDocument class functions as a wrapper class. Its purpose is to wrap (represent) the report passed out from the unmanaged RAS server.

The use of this binding scenario is replaced in Crystal Reports 10 with the following report binding scenario:

For a comparison table of Crystal Services see one of the following:

A superior solution for binding Report Application Server (RAS) reports is described in the report binding scenario Binding to Unmanaged RAS Using ReportDocument.Load() Method.

Pros

  • Uncomplicated access: reports from the unmanaged RAS server can be easily viewed in a tree view and dragged onto a Web Form.

Cons

This model is not particularly effective for object model interaction:

  • EnterpriseReportDocument, the wrapper class, is only used for passing the report to and from the unmanaged RAS server; it does not contain an object model.
  • This binding scenario offers only the limited object model contained within the CrystalReportViewer. See Which Object Model Should I Use?.

To use Crystal Services>Report Application Server

  • Crystal Reports 9 is installed and verified to be working.
  • The unmanaged Report Application Server (RAS) is installed and verified to be working.

Note

This procedure works only with a project that has been created from Project Setup. Project Setup contains specific namespace references and code configuration that is required for this procedure, and you will be unable to complete the procedure without that configuration. Therefore, before you begin this procedure, you must first follow the steps in Project Setup.

  1. In Visual Studio, open Server Explorer.

  2. Expand Crystal Services and then expand Server Files.

> [!NOTE]
> <P>In Crystal Reports 9, the Server Files node displays reports for the RAS server instead of from your local file directory.</P>
  1. Select a report from the Server Files tree and drag it onto your Web or Windows Form.

  2. Switch to code view and open the Web or Windows Form Designer generated code region.

    Note

    An EnterpriseReportDocument class has been instantiated and configured within this region.

  3. Within the ConfigureCrystalReports() method (that you have created in Project Setup), assign the EnterpriseReportDocument instance to the ReportSource property of the CrystalReportViewer control.

``` vb
myCrystalReportViewer.ReportSource = enterpriseReportDocument1
```

``` csharp
crystalReportViewer.ReportSource = enterpriseReportDocument1;
```
  1. To view the report, build and run your project.

See Also