This walkthrough illustrates how to create a simple Web application and set the HTTPHandler to output report information in PDF format.
This walkthrough is split up into the following activities:
To complete the walkthrough, you must have access to the NorthWind database (NWind.mdb). You must also have access to Internet Information Services either from your computer or from the server. You must also run the "Configure Web Sample" option from the Data Dynamics ActiveReports for .NET program menu from your Windows Start button.
When you have completed this walkthrough, you will have a report that looks similar to the following.
To add an ActiveReport to your project
To connect the report to a data source
To add controls to the report
| Control | Name | Text/Caption | Location |
|---|---|---|---|
| Label | lblProductName | Product Name | 0, 0 |
| Label | lblQuantityPerUnit | Quantity Per Unit | 1.1875, 0 |
| Label | lblInStock | In Stock | 2.5625, 0 |
| Label | lblUnitPrice | Unit Price | 4, 0 |
| Control | DataField | Name | Text/Caption | Location | OutputFormat |
|---|---|---|---|---|---|
| TextBox | ProductName | txtProductName | Product Name | 0, 0 | (Empty string) |
| TextBox | QuantityPerUnit | txtQuantityPerUnit | Quantity Per Unit | 1.1875, 0 | (Empty string) |
| TextBox | UnitsInStock | txtInStock | Units In Stock | 2.5625, 0 | (Empty string) |
| TextBox | UnitPrice | txtUnitPrice | Unit Price | 4, 0 | Currency |
To add code to the Web.config file
<httpHandlers>
<!--
********** ActiveReports HttpHandler Configuration **********
-->
<add verb="*" path="*.rpx" type="DataDynamics.ActiveReports.Web.Handlers.RpxHandler, ActiveReports.Web,
Version=3.0.0.1592, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
<add verb="*" path="*.ActiveReport" type="DataDynamics.ActiveReports.Web.Handlers.CompiledReportHandler,
ActiveReports.Web, Version=3.0.0.1592, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
<add verb="*" path="*.ArCacheItem" type="DataDynamics.ActiveReports.Web.Handlers.WebCacheAccessHandler,
ActiveReports.Web, Version=3.0.0.1592, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
</httpHandlers> Note The version number and PublicKeyToken will need to be updated to reflect the information for the current version of ActiveReports installed on your computer.
To add a link to the Web Form
<a href="rptHTTPHandlers.rpx?OutputFormat=pdf">WebApp.<span style="COLOR:red">rpx</span>/<span style="COLOR: green">
</span>OutputFormat=pdf<span style="COLOR:red"></span></a>
| See Also |
Walkthrough: Web Viewer Control | Samples | Walkthroughs | OutputFormat Strings | GroupKeepTogether enumeration
Copyright © 2005 Data Dynamics, Ltd. All rights reserved.