ActiveReports 11
ActiveReports Server
ActiveReports 11 > ActiveReports User Guide > Viewing Reports > ActiveReports Server

The ActiveReports WinForms Viewer and WPF Viewer let you print, and export reports that are hosted on ActiveReports Server. You can view reports in both the Viewers from the File menu using the Open from server command, or through code by invoking the ViewerExtension.LoadDocument method.

You can also view a specific report revision from ActiveReports Server. See Report Versions, for more information.

View Reports from ActiveReports Server

  1. From the Start menu, run the ActiveReports Viewer.
    Note: You can also find the GrapeCity.ActiveReports.Viewer.exe along with the GrapeCity.ActiveReports.WpfViewer.exe in the  ...\Program Files\Common Files\GrapeCity\ActiveReports 11 folder.
  2. In the viewer, from the File menu, select Open from server.
  3. In the Open report from server dialog that appears, enter the Server URL.
    Note: The server address syntax is http://<ServerName>:<PortNumber>/ where ServerName is the name of the machine on which ActiveReports Server is installed and PortNumber is the port on IIS where the server is installed. Example: http://1.0.0.0:8080/

  4. Enter the User Name and Password, and click Connect. The Connection status message changes to indicate when you are connected.
  5. Double click to navigate through the report folders below, select a report to view, and click Open.
    Note : The folders are Report Categories in ActiveReports Server. You can also view a specific version of a report from the server. Click the drop-down arrow next to the Open button to see a list of report revisions.

View Reports from ActiveReports Server Through Code

The following steps demonstrates how you can view reports that are hosted on ActiveReports Server in the Windows Forms Viewer or WPF Viewer.

Note : To view reports remotely from ActiveReports Server through code, add a reference to Json.NET (installed with ActiveReports).
  1. In Visual Studio, create a new Windows Forms or WPF application.
  2. From the toolbox, drag the Viewer control and drop it on the Windows Form or on the design view of MainWindow.xaml.
  3. Select the Viewer control, and in the Properties window, select the Events tab. Double click the Load (or Loaded event in case of WPF application) to create an event handling method.
  4. In the event handling method, add code like the following.
    Visual Basic.NET code. Paste at beginning of code view. 
    Copy Code
    Imports GrapeCity.ActiveReports.ArsClient
    
    Visual Basic. NET code. Paste INSIDE Form_Load event.
    Copy Code
    Dim serverReport As New RemoteReportDescriptor()
    ' Specify the Server URL and Credentials
    serverReport.ReportServerUrl = "http://1.0.0.0:8080/"
    serverReport.UserName = "admin_user"
    serverReport.Password = "password@123"
    
    ' Specify the Report Name
    serverReport.ReportName = "Customer List"
    serverReport.RevisionNumber = 1
    Viewer1.LoadDocument(serverReport)
    
    C# code.  Paste at beginning of code view.
    Copy Code
    using GrapeCity.ActiveReports.ArsClient;
    
    C# code. Paste INSIDE Form_Load event.
    Copy Code
    RemoteReportDescriptor serverReport = new RemoteReportDescriptor();
    // Specify the Server URL and Credentials
    serverReport.ReportServerUrl = "http://1.0.0.0:8080/";
    serverReport.UserName = "admin_user";
    serverReport.Password = "password@123";   
                
    // Specify the Report Name
    serverReport.ReportName = "Customer List";
    serverReport.RevisionNumber = 1;
    viewer1.LoadDocument(serverReport);
    
See Also

Getting Started