Share via


Reduced-Code Windows Project Setup with Crystal Reports Using Smart Tasks

Introduction

In this tutorial, you learn how to create a Windows project in Crystal Reports for Visual Studio. You then add a CrystalReportViewer control to the Windows Form. From the Smart Task panel, you open the embedded Crystal Reports Designer and create a new report. The Smart Tasks feature generates code that binds the report to the CrystalReportViewer control.

Throughout this tutorial, you can preview the report three ways:

  • In the embedded Crystal Reports Designer, with the new Preview button in Crystal Reports for Visual Studio.
  • In the Windows Form, with dummy data.
  • At runtime, when you build and compile the application.

At the end of this tutorial, you switch to code view, to see how the reduced-code development model functions in Crystal Reports for Visual Studio.

Sample Code

This tutorial comes with Visual Basic and C# sample code that show the completed version of the project. Follow the instructions in this tutorial to create a new project or open the sample code project to work from a completed version.

The sample code is stored in folders that are categorized by language and project type. The folder names for each sample code version are as follows:

  • C# Windows project: CS_Win_ReducedCode_ProjectSetup.
  • Visual Basic Windows project: VB_Win_ReducedCode_ProjectSetup.

To locate the folders that contain these samples, see Tutorials' Sample Code Directory.

In this section: