Range limits from local variables on a report or process say "no records to process" after a Pause window

Applies to: ABC report and process procedures (ThisReport, ThisProcess); posted in the Clarion 6 group.

Problem

A file has a single-component key on a date (LONG, @d17). A report and a process use a Pause control template to take a Start Date and an End Date into local variables. Whether the dates were entered as the low or the high range limit, the run always ended with the message that there were no records to process. The poster's filter worked, but wanted the key's range limit to do the date part and keep only the other conditions in the filter.

Solution

  1. The range limits had already been applied, probably with empty values, before the dates were typed. Setting them again after the Pause window is what is needed.
  2. In the ACCEPTED embed of the Pause button, before the generated code, add the range for the key field. For the process:
ThisProcess.AddRange(CUS:ExamDate,StartDate,EndDate)

For the report:

ThisReport.AddRange(CUS:ExamDate,StartDate,EndDate)
  1. The poster reported that this did the trick. A reply suggested calling ApplyFilter after the dates are entered.

Caveats

  • Another poster sets the filter in a routine called from the ThisWindow.OpenReport embed, before the parent call. That embed runs once, after the Pause button starts the report. The poster notes the Pause button's generated code has conditional parts.
  • The same poster says range limits and filters are the same thing: the templates build a filter statement from the range limit values.
  • The first poster did not report back on that second suggestion.

Today (2026)

Likely unchanged for ABC procedures; not re-tested.

Sources: Ben B. (Jan 2006, the question and the fix), Dennis E. (Jan 2006), Geoff B. (Jan 2006) in softvelocity.public.clarion6.