get clerk to act like report
Kenneth Brody
kenbrody at spamcop.net
Thu Apr 4 07:44:47 PDT 2013
On 4/4/2013 4:57 AM, Brian K. White wrote:
> I want to run a report that just calls a call table once for each record.
>
> Except in that call table I want to issue form commands, so I need clerk
> not report. Or else I need report with system clerk commands just to do
> the forms, which I would rather avoid.
Am I correct that different records may print different forms? (Otherwise,
you could just run the form in *report.)
> Records are selected via selection set. So the main input processing is
> just one line to call the call table. Except that by itself doesn't
> actually work. It just sits there at entsel on the first record.
That's because if the prc consists solely of that CALL, then it's not
triggered until you come out of update mode.
(Also, the above could have been simplified by simply making the called
table the input table.)
> If I make the table:
> ---top---
> end
> @entsel
> call "mytable"
> end
> ---end---
>
> Then I can walk the records and the call table runs on each, by pressing
> enter. But that's no good and I can't believe that adding a pushkey is
> really the answer either :)
That should work, though it is a bit kludgy.
Note that, if the selection set is pre-built, you could also use the "-xs"
flag to assist, as it would automatically exit dclerk if you press Enter on
the last record.
> So how can I construct an input processing and clerk command line
> options so that clerk will essentially behave as report and run once per
> selected record and then exit at the end of the selected records?
One possibility that comes to mind is to use the selection set to build a
demand index. Then use lookup-dash to traverse that index, printing the
forms along the way.
--
Kenneth Brody
More information about the Filepro-list
mailing list