Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

Crystal .NET Blog

Sample codes, tips, random rantings on Crystal Reports, Crystal Enterprise etc...

Summary of Recommended Report Binding Scenarios

Summary of Recommended Scenarios

To help you pick the best report binding scenario for your application, this section summaries the pros and cons of the recommended scenarios and explains why some are more popular.

Note   After reading through this section, you may want to view the detailed listing of all scenarios, to fully explore all options available in the SDK. See Detailed Listing of All Report Binding Scenarios blog posting.

Recommended binding scenarios for Crystal Reports

Scenarios that bind reports with the ReportDocument object model are generally preferred to scenarios that use the CrystalReportViewer object model. (Report Binding with ReportDocument Object Model and Report Binding with CrystalReportViewer Object Model.) That is because the ReportDocument object model provides a more extensive API for programmatic interaction with the report.

Most users of Crystal Reports for Visual Studio prefer the scenario Binding to an Embedded Report Class. While not the best choice to optimize performance, it is the simplest method to use: add a report to the project to create a report wrapper class, instantiate the report wrapper class, and then pass it to the CrystalReportViewer control. Because the report wrapper class inherits from the ReportDocument base class, you have access to the full functionality of the ReportDocument object model.

Another popular way to bind reports in Crystal Reports for Visual Studio is described in Binding to a Non-embedded Report Class Loaded into ReportDocument. It too gives you access to the full functionality of the ReportDocument object model, but offers the additional benefit of non-embedded reports, so that you can modify reports without recompiling the application.

Some binding scenarios use the ASP.NET Cache object (Binding to a Cached Embedded Report Class and Binding to a Non-embedded Report Class Loaded into a Cache Management Utility Class). Those scenarios optimize performance for reports with high shareability.

Recommended binding scenarios for Report Application Server (RAS)

If you have added the unmanaged Report Application Server  license to your Crystal Reports for Visual Studio application, then you have additional functionality:

  • Increased scalability that is provided by the RAS report engine.
  • Access to the ReportClientDocument object model, which gives you extensive capability to modify reports.

For RAS, you can use three report binding scenarios, depending on how you configure your project.

  • If you use Crystal Reports 10 with RAS 10, you can port projects that were originally created with Crystal Reports (using embedded reports) over to RAS and the ReportClientDocument object model, with only two additional lines of code required per report. Binding to Unmanaged RAS Using ReportDocument.Load() Method (RAS 10).
  • To optimize the above scenario, make copies of your embedded reports on the RAS server and direct RAS to use those copies. Binding to Unmanaged RAS Using ReportDocument.FileName Property (RAS 10).
  • When you create new projects in RAS 10, and for all work with RAS 9, you can load your reports directly into the ReportClientDocument object model. Binding to Managed RAS Using ReportAppFactory.OpenDocument() Method (RAS within CE 9 and up).

Recommended binding scenarios for Crystal Enterprise

If you have upgraded to Crystal Enterprise, you have four recommended report binding scenarios. Which scenario to use is determined by your requirements for report modification and scalability:

  • You can display a report, with no programmatic modifications, for the best speed and performance possible. Binding to ReportSource (Crystal Enterprise 10).
  • You can modify your report programmatically as part of the display process by accessing the ReportClientDocument object model. Binding to Managed RAS Using ReportAppFactory.OpenDocument() Method (RAS within CE 9 and up).
  • If you are using Crystal Reports 10 with Crystal Enterprise 10, you can port projects that were originally created with Crystal Reports (using embedded reports) over to Crystal Enterprise while retaining your existing report code by publishing copies of the embedded reports to Crystal Enterprise. Binding to Managed RAS Using ReportDocument.FileName Property (RAS within CE 10) to reference the report copies.
  • You can access your report as an InfoObject instance in the Enterprise framework, giving you the ability to schedule it and modify its parameters. Binding to InfoObject Cast as Report.
Published Monday, May 10, 2004 1:44 PM by crystal

Comments

No Comments
Anonymous comments are disabled