1.
Launch Visual Studio 2008.
2.
Select FileàNew Web Site from
the menu.
3.
Choose ASP.NET from the list of templates. You can select File or HTTP
from the Location drop down list. For this sample I will use File.
4.
Set the Web Site Name to AdventureWorksReports. The path should be
"..\Visual Studio 2008\WebSites\AdventureWorksReports."
5.
Select Visual C# from the Language drop down list and then click OK.
Visual Studio will create a new web site and add a Default.aspx
page and web.config file. Now you need to add a Crystal Report file to your
site. To do this, follow these steps:
1.
Right click on the web site in your Solution Explorer.
2.
Select Add New Item… from the pop-up menu.
3.
Click on Crystal Report from the templates. If you do not see Crystal
Report as an option then you need to run the Visual Studio 2008 installation
and select the option to install Crystal Reports. It comes free with Visual
Studio 2008.
4.
Change the name of the report to Invoice.rpt. The Language drop down
should already be set to Visual C#, but if it is not, do so now.
5.
Click the Add button.
Visual Studio will add the Crystal Report file to your web
site and bring up the Crystal Reports Gallery dialog. You may be prompted to
register your product if this is the first time you are using Crystal Reports.
You can skip registering the product, but it will keep prompting you every time
you open a report so it is worth taking the extra minute or two to register.
Once you get to the Crystal Reports Gallery dialog you should select the
"As a blank report" option and click OK.
Figure 2
Your report will be displayed in Visual Studio and you are
ready to start building your report.
Figure 3