Share via


Caching the CrystalReportSource Control

Windows projects that use Crystal Reports for Visual Studio continue to use the same caching framework that is used in Visual Studio .NET 2002 or 2003. That is, when a report is added to a project, two report wrapper classes are created: a regular report class and a cached report class.

If no report wrapper classes are generated for a report, caching is controlled through the EnableCaching property of the CrystalReportSource control.

To enable report caching in a Crystal Reports for Visual Studio Web Site

These steps make use of the Smart Tasks feature. The Smart Tasks feature is available in Visual Studio 2005 and up.

  1. Create a Crystal Reports for Visual Studio Web Site by following the reduced code Web Site tutorial: Tutorial: Reduced-Code Web Site Setup with Crystal Reports Using Smart Tasks.

  2. On the Default.aspx page, select Source view.

  3. Locate the XML tag for the CrystalReportSource control.

  4. Change the EnableCaching property value from False to True.

    Note

    For detailed information about report caching, the cached version of the report wrapper class, and an explanation of when and when not to use caching, see Cache and Persistence of the ReportDocument Object Model.

See Also