Your First Web Report

 Open Visual Studio 2005
Click File and select New Web Site
Under Visual Studio installed templates select ASP.NET Crystal Reports Web Site.
Click OK (Keep the default name CrystalReports Web Site).



The Project opens at the crystal report gallery
select using the report wizard.
select standard


expand the create new connection
expand the database files.


Browse to:  C:Program Files\Microsoft Visual Studio 8\Crystal Reports\Samples\en\Databases
Select the xtreme.mdb database.


Expand the Tables and select the Financials and click the > button.
Click the Next Button.


Select Statement Date, Cash and Account Receivable by holding the ctrl key while you select them and then click the >button again.
Click Next.


Grouping - you can select a field to group your data by, for this sample I would leave blank and just click the next button.
Record selection - again you can select a field to limit your data by, for this sample I would leave blank and just click the next button again. However if you have a large amount of data you can limit it here.
Report Style - I just use standard, this is a quick and dirty report. Click Finish You have Created a simple report.


This created your report and returns you to the Studio IDE with the new crystal reports on the screen.
Select File and Save All to preserve your report.
At the bottom of the screen, select Main Report Preview and you get to see your report.


Click the x in the upper right corner of the report (not the close studio X)
You will see default.aspx now open in source window.
Click on the lower left Design (next to source) You will see your report as it will appear on the web page.


Now right click on the page and select view in browser. This will bring up your report in your web browser.

Here is a tip - be certain to set your internet options for IE In IE click on tools and select internet options. Then click the security tab. On this tab click custom level. Scroll down to the ActiveX controls and plug-ins section and click enable for Automatic prompting for ActiveX controls. This will allow you to print your report from the crystal toolbar Click the x in the upper right corner of the report (not the close studio X) You have now created your first crystal report on the web.  Using the access database is almost like cheating since it doesn't require a login.  Other more robust databases such as SQL server require a user name and login which requires more code.

 

 

© Copyright 2005 instantcrystal.net Crystal Reports in ASP.NET