This topic guides you regarding the compatibility between the previous versions and ActiveReports 12. You may face issues related to following after the migration.
In ActiveReports 6.0 and above, the Show method has been removed from the report class and as a result, the dependency to the main assembly (ActiveReports6.dll) and the viewer assembly (Viewer6.dll) is no longer available. Earlier, the main assembly and the viewer assembly in the execution environment were required to be added even for the applications that did not required preview. In ActiveReports 6 or above, you no longer need to add the viewer assembly.
If you are previewing reports using the following code in a previous version, you need to change it to the preview method that uses the Viewer component.
Before migration
Visual Basic
Copy Code
|
|
---|---|
Private Sub Form1_Load(...) Handles MyBase.Load Dim rpt As New SampleReport rpt.Show() End Sub |
C#
Copy Code
|
|
---|---|
private void Form1_Load(object sender, System.EventArgs e) { SampleReport rpt = new SampleReport(); rpt.Show(); } |
In the following code, Form1 has been placed in the Viewer control. Here, if you set Document property of the report and then run the report, results obtained are similar to that with Show method.
After migration
Visual Basic
Copy Code
|
|
---|---|
Private Sub Form1_Load(...) Handles MyBase.Load Dim rpt As New SampleReport Me.Viewer1.Document = rpt.Document rpt.Run() End Sub |
C#
Copy Code
|
|
---|---|
private void Form1_Load(object sender, System.EventArgs e) { SampleReport rpt = new SampleReport(); this.viewer1.Document = rpt.Document; rpt.Run(); } |
In ActiveReports 7, the internal implementation of the Document.Print method has been changed. The Print method that was available in Document class upto ActiveReport 6 has been replaced by an extension method in PrintExtension class of Grapecity.ActiveReports namespace (GrapeCity.ActiveReports.Viewer.Win.v12.dll) introduced in ActiveReports 7. Therefore in ActiveReports 7 and above, you need to import namespace in order to use the Print method. For more details, see Print Methods.
ActiveReports 7 onward, toolbar has been reformed to use ToolStrip class. Also, the Viewer feature has been added to the toolbar and as a result, the display order of toolbar buttons has also changed. For more details, see Customizing the Viewer Control.
In case you have set the toolbar as Hidden, modify the code as follows:
Before migration
Visual Basic
Copy Code
|
|
---|---|
‘Code for ActiveReports 6 Me.Viewer1.Toolbar.Tools(23).Visible = False 'Hide the [Annotation] button Me.Viewer1.Toolbar.Tools(4).Visible = False ‘Hide the copy button |
C#
Copy Code
|
|
---|---|
//Code for ActiveReports 6 this.Viewer1.Toolbar.Tools(23).Visible == false //Hide the [Annotation] button this.Viewer1.Toolbar.Tools(4).Visible == false //Hide the copy button |
After migration
Visual Basic
Copy Code
|
|
---|---|
‘Viewer1.Toolbar.ToolStrip.Items.RemoveAt(37) |
C#
Copy Code
|
|
---|---|
//Viewer1.Toolbar.ToolStrip.Items.RemoveAt(37); |
In case you have set additional buttons in the toolbar through the code, you need to replace it with the new API code.
Before migration (from Version 6)
Visual Basic
Copy Code
|
|
---|---|
'Delete the existing Annotation button and add [Add Custom Annotation] button Dim image As System.Drawing.Icon Dim btn As DataDynamics.ActiveReports.Toolbar.Button btn.ButtonStyle = DataDynamics.ActiveReports.Toolbar.ButtonStyle.TextAndIcon btn.ImageIndex = 14 'Add new image in Toolbar.Images Private Sub Viewer1_ToolClick(ByVal sender As Object, ByVal e As DataDynamics.ActiveReports.Toolbar.ToolClickEventArgs) Handles Viewer1.ToolClick 'Describe about the event fired while pressing the annotation button End Sub |
C#
Copy Code
|
|
---|---|
//Delete the existing Annotation button and add [Add Custom Annotation] button System.Drawing.Icon image = default(System.Drawing.Icon); DataDynamics.ActiveReports.Toolbar.Button btn = default(DataDynamics.ActiveReports.Toolbar.Button); btn.ButtonStyle = DataDynamics.ActiveReports.Toolbar.ButtonStyle.TextAndIcon; btn.ImageIndex = 14; //Add new image in Toolbar.Images private void Viewer1_ToolClick(object sender, DataDynamics.ActiveReports.Toolbar.ToolClickEventArgs e) }
|
After migration (from Version 6)
Visual Basic
Copy Code
|
|
---|---|
'Delete the existing Annotation button and add [Add Custom Annotation] button Dim image As System.Drawing.Icon Dim btn As New ToolStripButton("Custom Annotation") ‘Viewer1.Toolbar.ToolStrip.Items.RemoveAt(37) ‘The annotation button is by default hidden in ActiveReports 7, so it doesn't need description. Private Sub tsbAnnotation_Click(sender As Object, e As EventArgs) ‘Describe about the event fired while pressing the annotation button End Sub |
C#
Copy Code
|
|
---|---|
//Delete the existing Annotation button and add [Add Custom Annotation] button System.Drawing.Icon image = default(System.Drawing.Icon); ToolStripButton btn = new ToolStripButton("Custom Annotation"); //Viewer1.Toolbar.ToolStrip.Items.RemoveAt(37); //The annotation button is by default hidden in ActiveReports 7, so it doesn't need description. private void tsbAnnotation_Click(object sender, EventArgs e) |
In C# code, remove the additional code of Viewer.ToolClick event handler in XXX.Designer.cs.
ActiveReports 6 or above does not provide support the use of control borders of the Line control. As a result, control border of the Line control set in the previous version will not get rendered after migrating to ActiveReports 7 or above.
You cannot set the control border in the following controls:
In ActiveReports 2 or above, the upper case and lower case characters of hyperlink strings used for directly referring the report layout file have been clearly distinguished. This may affect the working after the migration if upper case and lower case characters are not used correctly.
There are certain modifications in the properties available within the property window. In ActiveReports 1, you can use Report property to specify the report to be displayed. In ActiveReports 2 or above ReportName property has been introduced to replace Report property.
Please note that the Report property is removed from the property window but not from the WebViewer object, and hence there is no change in the code.
The type to set the Report property and ReportName property are different.