Adding a Search - Testing
It's a good idea to test each step of your report definition, so that you can catch errors early. You can do this in three ways:
- Click the [Check] button in the header of the Report Definition window. This will check that there are no syntax errors in the report, and will find some (though not all) logic errors as well. If there is an error, you will be told the nature of the error and the appropriate dialogue box will be opened so you can correct it.
- Click the [Run] button in the header of the Report Definition window to print the report. This allows you to check that the appearance of the report is correct. If there is a syntax error that would have been caught by the [Check] button, the report will not be printed.
- The [Check] and [Run] buttons will not find every logic error. You should therefore read through the report display areas on the 'Data' and 'Layout' cards extremely carefully to check the logic of your report before attempting to print it. Drawing up a report definition is effectively programming your copy of Hansa. As with programming of any kind, a bad logic error in a report definition may cause Hansa to crash.
! | Check the logic in your report extremely carefully. An error in report logic may cause Hansa to crash, with the risk of losing data. |
|
It's also a good idea to save the Report Definition frequently as you proceed through the design process. However, the [Check] and [Run] buttons will include the latest unsaved changes, if there are any.
To test the Category search, click the [Run] button. The specification window appears, and now includes a Category variable:
Enter a Category by typing or by using the 'Paste Special' list that was attached to the variable in the 'Variable' dialogue box. Then click the [Run] button. In the illustration below, we searched for Customers belonging to the "CUST" Category. This information is shown in the report header on the right. The search is case-sensitive, so searching for "cust" would have resulted in an empty report.