Creating an Increment Date field for a report criteria form

Reports are often designed to be run periodically and automatically. For reports like these, there is an option to automatically increment the dates on each successive report run. The amount by which the dates are incremented is set on the Background Queue form.

To add an Increment Date field with the correct properties:

  1. With the report criteria form open and in Design Mode, add a CheckBox component. Use these settings:
    • For the Name property, specify DateFieldIncrement, where DateField is the base name of your date fields.

      For example, if the base name of the date fields is RemindDateTime, with associated StartingRemindDateTime and EndingRemindDateTime components, then the name of this check box field should be RemindDateTimeIncrement.

    • For the Component Class property, select DateIncrementVar.
    • Bind it to a variable with the same name as the component (for example, RemindDateTimeIncrement. Give this variable an initial value of 0 (zero).

    Notice that, when you save the form, the Increment Date check box label displays automatically.

  2. For each date field, create a hidden Edit field:
    1. Name it DateFieldOffset, where DateField is the name of the starting date field.
      For example, for the StartingRemindDateTime date combo box, this field should be named RemindDateTimeStartingOffset.
    2. Set the Behavior > Hidden property to True.
    3. Bind it to a variable with the same name as the component (for example, RemindDateTimeStartingOffset), with no initial value.
    4. For the Component Class, select DateOffsetVar.
      Note: If your system does not have the DateOffsetVar component class, you can instead set the Data Type > Underlying Type to CHAR and the Length to 50.
    Remember to do this step for both the StartingRemindDateTime and EndingRemindDateTime fields.