This test will help you create a Web application using the Crystal Report-the data from the reports comes from a collection of objects, and you will create a special class to hold the stock market data.
I. DEVELOPMENT objectives
After completing this experiment, you will be able to better:
· Create a special class to hold the stock market value.
· Instantiate this class.
· Populates an object collection with data.
· Dynamically add data through a Web form.
· Use Crystal Report Designer to skillfully create a crystal statement.
Ii. Description of the content
This experiment will lead you to create a Crystal Reports Web application-The data in the report comes from a collection of objects. The application was successfully developed with Crystal Reports for Visual Studio 2.
You will then create a specialized class to hold the stock market values, instantiate the class and populate an object collection with data, and add data dynamically through a Web form. You will then create a crystal report by using the Crystal Reports designer control-it connects to the object collection and dynamically generates a chart and stock summary information.
Third, exercise one: Web application installation
Note In this exercise, you will create a new Web site and apply the standard settings to complete this exercise.
Detailed steps
1. Create a new ASP.net Web site in Visual Studio.
· Double-click the Visual Studio 2 shortcut on your desktop.
· Click "File | new | website".
· In the new Web Site dialog, click ASP.net web site.
· In the location list, select File System.
· In the Language list, select Visual C #.
· In the Location text field, accept the default path and name.
· Click OK.
2. Add Crystal the Viewer control.
· From Solution Explorer, double-click Default.aspx to open the Web form.
· Click the Design button at the bottom of the form to change the Web form to Design view.
· From the toolbar, expand the Crystal Reports node and navigate to the Crystalreportviewer control.
· Drag the Crystalreportviewer control to the Web form.
· If the Crystalreportviewer Tasks on the Smart Task panel is turned on, press ESC to close it.
· The Smart Task panel is a new feature in Visual Studio 2005-allowing less code to create a project. In this tab, you will use a programmatic approach, so you do not have to use the Smart Task panel.
· Click the Properties tab and select Crystalreportviewer.
· From the Properties window, set the ID property to Crystalreportviewer.
· From the File menu, click SaveAll.