Print Report Header, No Records
Brian K. White
brian at aljex.com
Tue Nov 17 22:07:17 PST 2015
On 11/17/2015 8:07 PM, Jim Asman via Filepro-list wrote:
>
> Is there an easy way to force a report header to print even
> those no records were selected?
>
> I thought that maybe a print command in @done processing might
> do it, but that doesn't appear to work.
>
> I can do this the hard way, but I thought I would ask first.
Well I can tell you that print in @once also does not work,
and that the printer init code does work.
And you can define a custom init just for one form without affecting any
other forms using the same print code table, and you don't *have* to
write a parent/wrapper script to write a header and then the report and
then concat them.
So this is one way you could get it without a script.
* Put all the header stuff into a file somewhere.
* Edit print code #850 or something high and out of the way, to say
%"/path/to/header.pcl"
Or, if you still want the normal init code (3) to run, then make 850 say
'%3 %"/path/to/header.pcl"' without the single quotes but with the
double quotes. Basically make 850 do all initting you need, either
directly or by including other print codes by number.
* In the F8 options on the report, change the init code from empty to 850.
Now, even when no records are selected, the init DOES still output.
The only point here is just that it's one way to get it all done without
having to write it in the form of a script, if that's a goal at all.
Installation or maintenance might be simpler for the end user this way.
It's all options right in filepro. Moving to some other system 5 years
later won't break it because of shell syntax or something etc.
If you want the header to appear on each page in addition to the
beginning of the report, you could just put code 850 in the header
section, except I don't know how you would avoid having a double header
at the beginning of a normal report that had records. At that point a
script is probably simpler.
Pardon me for telling you stuff you probably already knew. ;)
--
bkw
More information about the Filepro-list
mailing list