ActiveReports 11
ActiveX Viewer Migration
ActiveReports 11 > 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 11, you can use Flash viewer or the PDF export feature instead of ActiveX Viewer.

Note: To use the ActiveX viewer associated with previous version
In ActiveReports 11, 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

Before executing the actual migration, you can refer to the following alternate method. The alternate method is different for each ActiveReports edition. If you are using Professional edition, WebViewer (Flash viewer) is recommended. With the Flash viewer, you can use Flash component instead of ActiveX component to print or preview a report. If you are using Standard edition, you can 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.

Note: When using Flash viewer, the external characters are not printed even after registering them in report designer environment and client environment.

Not available in ActiveReports 11

Available in ActiveReports 11

Important Features ActiveX Viewer WebViewer (ActiveX) Professional Edition WebViewer (Flash) 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)

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

※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.

※4: A feature to perform scaling if the paper size specified while printing does not match to the paper size of report. This can be set through ScalePages property.

※5: A feature to adjust the page orientation if the print orientation specified while printing does not match the page orientation of the report. This can be set using AdjustPaperOrientation property.

To migrate project that uses ActiveXViewer as the ViewerType

If the ViewerType property is set to ActiveXViewer, you need to change it to FlashViewer or 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 "Flash viewer"
  Me.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.FlashViewer
 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 "Flash viewer":
            this.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.FlashViewer;
            break;
        case "HTML viewer":
            this.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.HtmlViewer;
            break;
        case "RawHtml":
            this.arvWebMain.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.RawHtml;
            break;
    }
}

If you are using Flash viewer in your project, you need to remove the old Flash viewer files (.swf) and copy the latest Flash viewer files (.swf) located in the deployment folder:

Deployment\
 Flash\
     Grapecity.ActiveReports.Flash.v9.Resources.swf
     Grapecity.ActiveReports.Flash.v9.swf
     Themes\
     FluorescentBlue.swf
     Office.swf
     OliveGreen.swf
     Orange.swf
     VistaAero.swf
     WindowsClassic.swf
     XP.swf

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.