Report Printing from @key / input processing

John Esak john at valar.com
Tue Aug 29 14:53:25 PDT 2006


Richard,

Here is the fix for the message I screwed up earlier using the PRINT command
where it can not be used. I was making things much harder than they are to
print a header-detail report.


I'll use roughly the same format (example only of course) but it doesn't
need variables. Just use the real fields in the detail file.


Special Report Of Items Per Customer                           Date: *@td
Customer Code: *@pm                                            Page: <@pn

Date          Inv#         Amount
========================================================
*4           *5            *6


You will use roughly the same code, but it will be in a dreport "called" by
a SYSTEM command from the @key. You need to pass the value of the unique
code to the dreport processing and use the FORM command instead of the PRINT
command I had used erroneously in the previous message. Also, you must be
certain to choose "Remove unnecessary blank lines." on the output format
options page. So, it might look like this:

INPUT PROCESSING

@keyC    if:
       then: input popup q(1,yesno) "Are you SURE you want this report?
(y/n) "
         if: q ne "Y"
       then: end
       then: declare SysCmd
       then: SysCmd="dreport inv_file -f formatname -v getcus -a -iB -u -r"
< 3
       then: system SysCmd
       then: end

You need a sort/select (-v) processing table called "getcus" (or whatever
you would like to name it) that looks like this.

SORT/SELECT PROCESSING (built with Define Processing -> Output Processing)

        if: 1 eq @pm
      then: select
      then: end


There is no OUTPUT PROCESSING required for this method.


Index.B should be built on the unique code. (Add to that a second key of
date, and the records will be sorted by date.)


Sorry, to have screwed up the previous sendings... I was on the phone at the
time and not thinking correctly about anything. :-)

By the way, to do this *really* right... you should do it from @entsel with
the @entsel/global-var trick I've shown a million times here. This way when
someone presses the @key to run this report, it won't lock the header record
while the report is running.

John



More information about the Filepro-list mailing list