Language:


Searching for Records within a Period

It will often be necessary to provide a search for records that fall within a certain period. For example, you might want to produce a list of Invoices from a particular period. To do this, you need to add what is essentially a standard search as described here. Follow these steps:
  1. Create a new report. On the 'Data' card, specify that the Invoice register is to be the primary register. On the 'Layout' card, design the output of the report as required.

  2. To add the period search, return to the 'Data' card and click on the line in the report display area marked "Register: Invoices..." to specify that the search is to be carried out in the Invoice register. Click the [Selection] button and complete the 'Selection' dialogue box as illustrated below:

    This places a variable named vdDate in the specification window where the user can enter the required period (start and end dates separated by a colon). The Paste Register is PerSClass, so the user will be able to choose a Period from the Reporting Periods setting using the 'Paste Special' function. You can enter "PerSClass" yourself, or you can choose it from a list of options by clicking the [Paste Window] button. This will ensure it is spelt correctly. There is no need to specify a Value in the 'Selection' dialogue box: the first record in the Reporting Periods setting will be offered as a default value for the vdDate variable when the user opens the specification window.

    When the report is produced, there will be a search for Invoices whose Invoice Date is later than or equal to the start date of the specified period, and earlier than or equal to the end date.

Please click the links below for more details about: