O'Reilly logo

Integrating Crystal Reports into an ASP.NET Application by Vince Varallo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

1.6. Using the Crystal Reports Viewer

Now that you have a report, you need to allow a user to view it. So far, you've seen how to preview the report in the Visual Studio Designer, but the user of your application needs a way to view the report. Crystal Reports comes with a viewer control that will do all the heavy lifting, and it is a relatively trivial task to display your report to the user. Follow these steps to change the Default page to display the Employee report you've just created.

  1. Open the Default.aspx page in Design mode.

  2. From the toolbar, drag a CrystalReportsViewer control onto the Default.aspx page.

  3. Double-click on the Default page to create the Page_Load event in the code-behind page, and enter the following code:

    protected void Page_Load(object ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required