ActiveReports 13
ActiveX Viewer Migration
ActiveReports 13 > ActiveReports User Guide > Upgrading Reports > Migrating from Previous Versions > ActiveX Viewer Migration

This topic explains how to migrate the ActiveX viewer included in ActiveReports 3, 2, and 1.

Migration Requirements

In ActiveReports 6 or above, ActiveX viewer (ARVIEW2.CAB) is not provided with the product installer. You need to migrate a web application that includes ActiveX viewer on the Web form or contains the WebViewer with ViewerType property set to ActiveXViewer. In ActiveReports 13, you can use the PDF export feature instead of ActiveX Viewer.

Note: To use the ActiveX viewer associated with previous version
In ActiveReports 13, you cannot use the ActiveX viewer of previous version. You can obtain the expected display or print results as per the report, however, such usage methods are not included in the product operational guarantee.

Alternative Approach

For both Professional and Standard editions, use PDF export to preview or print a report with quality similar to that observed with ActiveX viewer.

Precautions

You can use print and preview features with same quality as mentioned in alternate approach, however, some print features are disabled.

Not available in ActiveReports 13

Available in ActiveReports 13

Important Features ActiveX Viewer WebViewer (ActiveX) Professional Edition WebViewer (PDF) Professional Edition PDF Export
Direct printing from client printer
Direct printing from client printer without preview
Direct printing from client printer without preview (Windows print dialog is hidden ※1) × ×
Direct printing from client printer after changing settings (printer type, paper size etc.)
(※3)

(※3)

(※2)

(※2)
Auto scaling × × × ×
Automatic setting of page orientation × × × ×

※1: In client printing, if you click Print button, Windows Print dialog is displayed. In ActiveX viewer you can hide the Windows Print dialog.

※2: In Windows Print dialog, similar to general Office application, you can select paper size or orientation.

※3: In addition to point ※2, the developer can set the desired page size or page orientation in the printer through client scripting before the user displays the Windows print dialog.

To migrate project that uses ActiveXViewer as the ViewerType

If the ViewerType property is set to ActiveXViewer, you need to change it to AcrobatReader. For example, modify the code marked in red like the following code.

Before migration

Visual Basic

 

Copy Code
' Set the type of the selected view in ViewerType property of the Web viewer.
Dim selection As String = Me.cboViewerType.Items(Me.cboViewerType.SelectedIndex).Text
Select Case selection
 Case "AcrobatReader"
  Me.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.AcrobatReader
 Case "ActiveX viewer"
  Me.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.ActiveXViewer
 Case "HTML viewer"
  Me.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.HtmlViewer
 Case "RawHtml"
  Me.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.RawHtml
End Select

C#

 

Copy Code

// Set the type of the selected view in ViewerType property of the Web viewer.

{
    string selection = this.cboViewerType.Items(this.cboViewerType.SelectedIndex).Text;
    switch (selection) {
        case "AcrobatReader":
            this.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.AcrobatReader;
            break;
        case "ActiveX viewer":
            this.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.ActiveXViewer;
            break;
        case "HTML viewer":
            this.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.HtmlViewer;
            break;
        case "RawHtml":
            this.arvWebMain.ViewerType = DataDynamics.ActiveReports.Web.ViewerType.RawHtml;
            break;
    }
}

After migration

Visual Basic

 

Copy Code
' Set the type of the selected view in ViewerType property of the Web viewer.
Dim selection As String = Me.cboViewerType.Items(Me.cboViewerType.SelectedIndex).Text
Select Case selection
 Case "AcrobatReader"
  Me.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.AcrobatReader
 Case "HTML viewer"
  Me.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.HtmlViewer
 Case "RawHtml"
  Me.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.RawHtml
End Select

C#

 

Copy Code

// Set the type of the selected view in ViewerType property of the Web viewer.

{
    string selection = this.cboViewerType.Items(this.cboViewerType.SelectedIndex).Text;
    switch (selection) {
        case "AcrobatReader":
            this.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.AcrobatReader;
            break;
        case "HTML viewer":
            this.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.HtmlViewer;
            break;
        case "RawHtml":
            this.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.RawHtml;
            break;
    }
}

To migrate project that uses PDF Export

Re-create the application by referring the following basic operation or sample. Note that you don't need to re-create everything.
The basic difference between ActiveX viewer and PDF export is in the format of the data received from the web server to the client. An RDF file is generated on the Web server with ActiveX viewer and binary data of PDF format is created on the web server with PDF export. The other operations are common in ActiveX viewer and PDF export, there is no need to re-create the existing applications that are created using the ActiveX viewer.