Share via


Reduced-Code Exposing Report Data to Other Controls in a Web Site

Introduction

In this tutorial, you learn to expose Crystal report data from the CrystalReportViewer control to a label control in the Web Site.

To begin, you create an ASP.NET Web Site in Visual Studio and you add a CrystalReportViewer control to the Web Form. Then you add a label to the Web Form to display report data. From Smart Tasks, you create a CrystalReportSource control, and then add a sample report to it. You add a drill-down event to the CrystalReportViewer control. Finally, you expose the drill-down event's report data to the label control.

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# Web Site: CS_Web_ReducedCode_ReportData
  • Visual Basic Web Site: VB_Web_ReducedCode_ReportData

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

In this section: