Databases Reference
In-Depth Information
In this simple example, I use a simple thermometer gauge to display sales totals relative to a goal. Figure
7-77 shows a report containing an image item with the size and position of the gauge. It can contain any
image content since it's only used as a placeholder. In this example, the image is separate from any other
report content.
Figure 7-77
The actual ASP.NET web forms application includes two web forms, or pages. The first is used to render
the gauge image to a file and the second is used to render the report. This page has no controls or con-
tent at design time. Program code running as it loads will fill the empty page with the report content and
the gauge image as it is processed on the web server, before this content is sent to the web browser.
The first page contains the Dundas Gauge web form control. Figure 7-78 shows this control, configured
as a thermometer, with the Gauge Wizard property page.
A standard button control is used to render the gauge to a file and then redirect the web application to
the second page. The following Visual Basic .NET code runs on the Click event for this button. The first
two lines, following the two comments, assign the gauge pointer (in this case, the thermometer bar) a
value and then render the gauge to a PNG graphic file. In production, the value would most likely be
obtained from a database query. Note that the file location maps to a web folder (report_images) under
the default root web folder on the local web server.
Search WWH ::




Custom Search