Grid Articles and Tutorials

Report Control to Grid Migration Guide

Author: Alexander Stoyan
Platform: ActiveX

Beginning with version 22.0.0 the Report control is shipped under a new name Grid Control. It was a necessary and long planned name change for this control, which eliminates some common confusion about the true purpose of the control, and unlock all future related development. The logic of working with the control, related objects, interfaces and API's has remained unchanged except where the name Report was used. In all such cases the name Grid has been used instead. All users who upgrade Toolkit Pro or Suite Pro from a previous version will have to perform this migration by following the instructions outlined in this guide.

Because the control was only renamed to Grid from Report, this guide assumes the same changes should be made in your project as well. In most cases this can be achieved by using a simple plain text replacement of all Report and REPORT occurrences with Grid and GRID respectively.

Automating "Report" to "Grid" replacement.

We recommend using the Grep utility that is available with SuitePro installation packages for this task. This will help eliminate any errors and make the process less tedious. The utility can be found in the following installation folder depending on your version:

  • C:\Program Files (x86)\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v22.1.0\Utils\Grep.exe

Report to Grid renaming in Grep

Using the Grep utility is quite simple in this case:

  1. Find what: and Replace with: search terms must be specified as mentioned above.
  2. The Look in: string must be a full path to the code base location and the Include sub-folders checkmark must be checked.
  3. Match case Find Options must be also be checked, however Match whole words must be unchecked in order to perform replacement inside identifier names.

After pressing the Find All button, a confirmation is displayed for each occurrence (shown in blue) that will be replaced with a preview shown (shown in red). You can use this list to review all found occurrences. Any false positives can be ignored by removing the check mark in the rightmost column of each found occurrence. A group of random occurrences can be selected with the Ctrl key held pressed, and the Space bar key can be used for disabling/enabling the selected occurrences.

After you have reviewed all of the items in the list, press the Apply button to apply all changes in one batch. All affected files will be updated with the specified changes from your list.

Because SuitePro can be used from any environment that can reference and host ActiveX controls, fixing identifier and constant names is not always sufficient. In most cases the reference to the control will have to be fixed as well and the approach will be specific to each environment as every environment uses its own files, formats and ActiveX component referencing methods.

In most cases either the OCX file path, COM class ID (CLSID) and type library ID will have to be replaced in project files. In some environments this can be achieved via simple plain text replacements, but in some cases the easiest way will be to remove all Report control references manually and then re-insert the new Grid control at the every location where Report was removed and restore its properties.

The easiest way to get Grid control OCX path, CLSID and type library ID is to use Microsoft OleView utility that shows Xtreme Grid Control in the Controls folder:

Grid Control in OleView

For example, Visual Basic 6 project references Report control in its VBP project file using its type library ID as:

Object={7CAC59E5-B703-4CCF-B326-8B956D962F27}#19.1#0; Codejock.ReportControl.v19.1.0.ocx

Using the OleView tool the type library information can be access this way:

Grid Control Type Library

The selected UUID value in the picture is the type library ID to be used, the version can be seen on the next line. Using all this information the VB6 project reference line can be modified as follows:

Object=7CAC59E5-B703-4CCF-B326-8B956D962F27#22.1#0; Codejock.GridControl.v22.1.0.ocx

After patching the project file, the form source files where Report control is used will have to be patched in the same way as well.