Guides & Tutorials (beta)

Report Control to Grid Migration Guide | Visual C++

by Alexander Stoyan Visual C++ Created on 05/03/2024  |  Updated on 10/28/2024 0/5 ( 0 votes )

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 ToolkitPro 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\MFC\Xtreme ToolkitPro 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.

In order to simplify migration for C++ users a list of backward compatible aliases has been added in the file GridControl\XTPGridDeprecated.h. Including this file in your project will make it possible to keep using class names that start with CXTPReport*, constant names like xtpReport* and XTP_REPORT*. However each use of the legacy names will result in a deprecated API warning.

User Comments

No comments yet, sign in to comment.

Secure Transactions

Online transactions are secure and protected.


Ssl seal 1
This site is protected by Trustwave's Trusted Commerce program
CompliAssure Secured

Money Back Guarantee

If you are not 100% happy with your purchase within 30 days, you can return it for any reason. Your satisfaction is our priority!


Satisfication Guarantee

Contact sales@codejock.com for more details.