ActiveReports 6 Online Help
Document Windows Application
Show AllShow All
Hide AllHide All

In ActiveReports 6, you can use a Web Service that returns the content of an ActiveReport to show in the Windows Forms viewer control.

This walkthrough illustrates how to create a Windows client application that returns the content of an ActiveReport in the Windows Forms viewer.

This walkthrough builds on the Document Web Service walkthrough and is split up into the following activities:

To complete the walkthrough, you must have access to the Northwind database.
A copy is located at C:\Program Files\GrapeCity\ActiveReports 6\Data\NWIND.MDB (on a 64-bit Windows operating system, a copy is located in C:\Program Files (x86)\GrapeCity\ActiveReports 6\Data\NWIND.MDB).

When you have finished this walkthrough, you will have a report that looks similar to the following.

To create a Visual Studio project

  1. From the File menu, select New, then Project.
  2. In the Templates section of the New Project dialog, select Windows Application.
  3. Change the name of the application to ARDocumentClient.
  4. Click OK to open the project.

To add the ActiveReports viewer control

  1. From the Visual Studio toolbox, drag the ActiveReports Viewer control onto the form.
  2. Change the Dock property for the viewer control to Fill, and resize the form to accommodate a report.

To add a web reference

To add a reference to a web service in Visual Studio 2005

To add a reference to a web service in Visual Studio 2008 or 2010 that is compatible with .NET Framework 2.0 Web service

To add a reference to a web service in Visual Studio 2008 or Visual Studio 2010

To display the content returned by the Document Web Service in the viewer

To display the content (for Visual Studio 2005 and Visual Studio 2008 or 2010 compatible with .NET Framework 2.0 Web service)

To display the content (for Visual Studio 2008 or 2010)

To update the app.config file (Visual Studio 2008 or 2010 project)

Note: You need to update the app.config file if you added the Service Reference to the Visual Studio 2008 or 2010 project in the previous section.
  1. In the Solution Explorer, open the app.config file.
  2. In the tag <binding name = "ServiceSoap"...>, set maxBufferSize and maxReceivedMessageSize to some large number, for example, 200500.
  3. In the next tag <readerQuotas...>, set maxArrayLength to some large number, for example, 60500.

To run the project

See Also