Glossary Item Box

Samples | Walkthroughs | Custom Web Exporting Walkthroughs

See Also ActiveReports for .NET 2 Online Help Send feedback to Data Dynamics

Walkthrough: Exporting Output

Included with ActiveReports are several specialized export filters (HTML, PDF, RTF, Excel, TIFF and Text). With these export filters, reports easily can be made available to others in various file formats.

This walkthrough illustrates how to export a report to PDF, HTML, RTF, Text, TIFF and Excel files.

This walkthrough is split up into the following activities:

To complete the walkthrough, you must have access to the NorthWind database (NWind.mdb).

When you have completed this walkthrough, you will have created PDF, HTML, RTF, Text, TIFF and Excel files which can be found in the Bin/Debug (C#) or Bin (VB.NET) subfolder of your project's folder.

Adding an ActiveReport to a Visual Studio project

To add an ActiveReport to your project

  1. Open a new project in Visual Studio.
  2. Click on Project > Add New Item.
  3. Select ActiveReports file and rename the file rptExports.
  4. Click Open.

Adding the export filters to your project

To add the export filters to your project

  1. Click on the following export controls one at a time in the appropriate toolbox to select them.
    • HtmlExport
    • PdfExport
    • RtfExport
    • TextExport
    • TiffExport
    • XlsExport
  2. Drag each control onto the Windows Form.
  3. The controls will appear in the tray underneath the Windows Form.

Connecting the report to a data source

To connect the report to a data source

  1. Click on the yellow report DataSource icon in the Detail section. This brings up the report DataSource dialog box.
  2. Click on Build...
  3. Select Microsoft Jet 4.0 OLE DB Provider and click Next >>
  4. Click on the ellipsis to browse for the access path to NWind.mdb. Click Open once you have selected the appropriate access path.
  5. Click OK to continue.
  6. In the Query field, type "Select * from employees".
  7. Click OK to return to the report design surface.

Adding controls to display the data

To add controls to the report

Using the export methods to export files to all available file formats

To write the code in Visual Basic

To write the code in C#

Samples | Walkthroughs | Custom Web Exporting Walkthroughs

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.