Project Templates

In Crystal Reports for Visual Studio 2005 and later, project templates are provided for creating new Web Sites or Windows projects. The instructions below show you how to access project templates in either a Windows project or a Web Site.

Project templates give you a basic example of a working report. However, if you are writing code in Crystal Reports, it is recommended that you work through the tutorials in Tutorials and Sample Code. These tutorials guide you through a standard Project Setup approach, which configures additional code and best practices that are not provided by the project templates.

To access Crystal Reports project templates for a Windows project

  1. Launch Visual Studio and from the File menu click New, and then click Project.

  2. In the New Project dialog box, on the Templates panel, select Crystal Reports Windows application.

  3. In the Name field, enter a new name for the project, and then click OK.

    The project template loads. You are prompted to create a new Crystal Report.

This gives you a project with a CrystalReportViewer control on the Windows form, an embedded report in the Solution Explorer, and hidden report binding code in the form designer partial class.

Note

If you work through one of the coding tutorials provided with this documentation, do not use this project template as the basis for the tutorial. Instead, follow the tutorial instructions, which guide you to complete a standard Project Setup.

For more information, see Tutorials and Sample Code.

To access Crystal Reports project templates for a Web Site

  1. Launch Visual Studio and from the File menu click New, and then click Web Site.

  2. In the New Project dialog box, in the Templates panel, select ASP.NET Crystal Reports Web Site.

  3. In the Location field, enter a path to a folder to hold the Web Site, and then click OK.

    The Web Site template loads. You are prompted to create a new Crystal Report.

This gives you a Web Site with a CrystalReportViewer control on the ASPX page, a non-embedded report in the Solution Explorer, and declarative report binding code in the ASPX page.

Note

If you work through one of the coding tutorials provided with this documentation, do not use this project template as the basis for the tutorial. Instead, follow the tutorial instructions, which guide you to complete a standard Project Setup.

For more information, see Tutorials and Sample Code.