Add Reporting to Your ASP.NET Site | 2


[prev]

Add Reporting to Your ASP.NET Site [con't]

Now we need to display this report in our website so that users are able to view it. To view a report on the website we need to create a new ASP page and then add a Crystal Report viewer. The report viewer will enable users to view a report. I've created an ASP page called reportviewer. With the reportviewer component added, the page code looks like this:

Now select the reportviewer component and add our report as the reportsource as shown:

Figure 9: Select the Reportviewer Component

Figure 10: Add Report as the Reportsource

Click OK. The page should have the following code at this point:

Now save the project and then run the page. This is what my page looks like:

Figure 10: Complete Report Page

Conclusion

That's how easy it is to add reporting to a website. If you want to add more reports, simply repeat the process described above and then add the new reports to the pages as you desire. A possible complication is the request for a database login. To bypass this, simply add your database login information on the form_load event.

Original: Aug. 2, 2010


[prev]