Share via


Configuring the CrystalReportSource using Smart Tasks

A new GUI feature for .NET controls, called Smart Tasks, was added to Visual Studio 2005. For the CrystalReportViewer control in Web Sites, the Smart Task panel is named "CrystalReportViewer Tasks."

The "CrystalReportViewer Tasks" Smart Task panel enables you to configure several features of the CrystalReportViewer control, without having to write code. Any selections that you make in Smart Tasks are generated as tag-based settings within the ASPX page.

In this section, you configure the main feature that is available from the "CrystalReportViewer Tasks" Smart Task: the CrystalReportSource control. Later in these reduced-code tutorials, you examine other features of Smart Tasks.

  1. If the Smart Task panel is currently open, click on the Web Form to close the Smart Task panel.

  2. On the upper-right corner of the CrystalReportViewer control, click on the small triangular button.

The named "CrystalReportViewer Tasks" re-opens. In the Choose Report Source list, \<None\> is displayed.
  1. Click the Choose Report Source list and select <New report source…>.
The Create ReportSource dialog box opens.
  1. In the Specify a name for the control textbox, leave the default entry as CrystalReportSource1.

  2. Click the Specify a report for the ReportSource control drop- down list and select <Browse…>.

The Select a Crystal Report dialog box opens.
  1. Navigate to the World Sales Report.rpt file in the General Business folder of the Crystal Reports sample reports directory. (See Sample Reports' Directory for the locations of the sample reports.)
> [!NOTE]
> <P>The World Sales Report report retrieves its data from the Access database xtreme.mdb. If you have not verified the location of this database and its ODBC DSN configuration, see <A href="ms225528(v=vs.90).md">What Needs to be Verified?</A>.</P>
  1. Select the World Sales Report.rpt file and click Open.
At this point, the report becomes the designated report for the CrystalReportViewer control.
  1. From the File menu, click Save All.