How can a Clipper Query be added to the Executive Report / Portability Assessment Reports?
For this article, the standard query - Data Queries/Computational Data - is to be included in the Portability Assessment part of the Executive Report.
To do this....
1. In the MW-installation/TEMPLATES directory, find the file HCSearch.xml.
2. Search the file and identify the required query - for this example, look for Name="Data Queries" and Name="Computational Data"
- The statement found would be as follows...
CRITERION Description="This query will find all declarations of computational data items. Computational data items are numeric only and can be used in arithmetic statements more efficiently." Name="Computational Data" Category="" System="True"
- This will confirm the existence of the query, and that it will be available to run in the required part of the report.
3. It is recommended that the Common.HCSearch.xml file is NEVER updated manually, as it is updated by configuration of the toos and installation of hot fixes. This will result in any changes being lost. and will mean re-amending the file after each hot fix or configuration change.
4. In the MW-installation/DATA directory, find the file CommonDefects.xml.
5. The query needs to be included after "COMP Declarations" in the "Potential Code Anomalies" section of the Executive/Portability Assessment Report.
6. Search for "COMP Declarations" in the CommonDefects.xml file, which should result in the following statement...
DEFECT id=COMPDeclarations Criterion="General:Portability Assessment\Persistent Storage\Data\COMP Declarations" ListName="COMP Declarations" Caption="COMP Declarations" Group="Data" Enabled="True" Internal="False" /
7. Insert a new line after this as follows...
DEFECT id=GeneralCompData Criterion="General:Data Queries\Computational Data" ListName="Computational Data" Caption="Computational Data" Group="Data Queries" Enabled="True" Internal="False" /
8. Save the amended file and re-run the Executive / Portability Assessment Report