Beruflich Dokumente
Kultur Dokumente
© 2003 Crystal Decisions, Inc. Crystal Decisions, Crystal Reports, Crystal Enterprise,
Crystal Analysis, Crystal Services, Crystal Care, Crystal Assist, Crystal Applications, Info
and Holos are trademarks or registered trademarks of Crystal Decisions, Inc. in the U.S.
and/or other countries. All other trademarks or registered trademarks referenced are the
property of their respective owners.
Version 2.0
Page 2
Interactivity and Reports in Web Applications
Page 3
Interactivity and Reports in Web Applications
Page 4
Interactivity and Reports in Web Applications
Page 5
Interactivity and Reports in Web Applications
10. If you have modified fields in xtreme.mdb, right-click in a report area, point to
Database and select Verify Database. A message titled Verify Database suggests
you to proceed to fix up the report. Click OK to fix up unmapped fields in the database.
11. Choose File | Save Sales By Country.rpt to save the report with the updated database
location.
The window for the Web Forms page consists of two tabs: Design and HTML. The Design
tab allows programming using the Visual Studio IDE. The HTML tab contains the HTML
source that supports ASP.NET. Visual Studio automatically opens the Design tab of
WebForm1.aspx.
Page 6
Interactivity and Reports in Web Applications
TIP In Visual Studio .NET, you can anchor the Toolbox by clicking the "pin" icon at
the top-right corner of the Toolbox.
Also, items in a Toolbox tab can be displayed alphabetically by right-clicking the tab,
and selecting Sort Items Alphabetically from the shortcut menu.
Page 7
Interactivity and Reports in Web Applications
Page 8
Interactivity and Reports in Web Applications
3. You may adjust the length and the width of the image control to display the flag in the
appropriate scale.
To specify a report file for the Web Forms Viewer control
1. In the Design tab of WebForm1.aspx, select the Web Forms Viewer control. The
Properties window automatically displays the properties applicable to it.
2. Select DataBindings in the Properties window, and click the square button to the right
of the entry field. This opens the DataBindings dialog box.
3. In the DataBindings dialog box, select ReportSource under Bindable Properties,
and enter the full path name, "C:\\Inetpub\\wwwroot\\WalkthroughFiles\\Sales By
Country.rpt" (with the double quotes) under Custom binding expression. The Web
Forms Viewer control automatically displays this report at design time.
Page 9
Interactivity and Reports in Web Applications
4. Highlight WebForm1.aspx in the Solution Explorer and click the View Code icon. In
WebForm1.aspx.cs, after the call to base.OnInit(e) in OnInit, enter this line:
DataBind();
5. You may adjust the size of the Web Forms Viewer control as you see fit, by first setting
the property, BestFitPage, to False, and then adjusting handles of the Viewer in the
Design tab.
Page 10
Interactivity and Reports in Web Applications
Below shows a layout of the Web Form in the Visual Studio editor, with the image and Web
Forms Viewer controls initialized.
Page 11
Interactivity and Reports in Web Applications
sGroupName = e.NewGroupName;
string imageURL = string.Format
("http://localhost//WalkthroughFiles//{0}.jpg", sGroupName);
Image1.ImageUrl = imageURL;
}
Page 12
Interactivity and Reports in Web Applications
Page 13
Interactivity and Reports in Web Applications
Page 14
Interactivity and Reports in Web Applications
For instance, to view the sum of last year's sales for the top 5 regions in Italy, you can drill
down on "Italy" in Chart A. In this database, since there are only 3 regions in Italy (i.e.,
Lombardia, Piedmonte and Lazio) with sales, only the sum of last year's sales of each of
these 3 regions will be displayed in Chart B.
Page 15
Interactivity and Reports in Web Applications
At this point, you may click a region in the group tree, or further expand the group tree to
select a city or customer to display the corresponding sales. For instance, you can click the
region, Lombardia, in the group tree. The report will display in Chart C the sum of last year's
sales of the two cities in Lombardia, Bergamo and Milan.
Page 16
Interactivity and Reports in Web Applications
You may further expand the group tree and select a city or customer name to display the
corresponding sales for that city or customer. For example, if you click the city Milan, the
report will show the sales for each customer in Milan; in this database, since there is only
one customer, Milano Bike Store, in Milan, the report will only show the sales for that
customer.
Clicking on a city in the group You can click the up-arrow icon
tree will show sales of each anytime to traverse one level up
customer in that city. in the group tree.
Note that at any point, you can click the up-arrow icon in the Web Forms Viewer toolbar to
traverse one level up in the group tree.
Page 17