ActiveReports 6 Online Help
Viewing Reports
Show AllShow All
Hide AllHide All

Previewing Reports at Design Time

ActiveReports makes it easy for you to preview your report while you are still creating it. Just click the Preview tab at the bottom of the ActiveReport designer. In this way you can see and work with the report without the need to run the project. 

Using the ActiveReports Windows Form Viewer

In this example, the report is named rptMain. If you copy and paste the code below, replace rptMain with the name of your report. 

To display report output in the Viewer control

  1. From the Visual Studio toolbox, drag the ActiveReports Viewer control onto your Windows form.
  2. Set the viewer's Dock property to Fill.
  3. Double-click the title bar of the Windows Form to create an event-handling method for the form Load event.
  4. Add code to the handler to run the report and display it in the viewer.

The following examples show what the code for the method looks like.

To write the code in Visual Basic.NET

To write the code in C#

Note: To enable the viewer's Copy button, add references to the RtfExport and TextExport DLLs.