Report Printing from @key / input processing
Richard Tartaglia
fp_rich at yahoo.com
Wed Aug 30 06:52:43 PDT 2006
TOP POSTED
Thanks everyone for all your help. It came intime to
save me some hair to pull out tomorrow.
Thanks again.
Rich Tartaglia
--- GCC Consulting <gccconsulting at comcast.net> wrote:
>
>
> > -----Original Message-----
> > From:
> >
>
filepro-list-bounces+gccconsulting=comcast.net at lists.celestial
> > .com
> >
>
[mailto:filepro-list-bounces+gccconsulting=comcast.net at lists.c
> > elestial.com] On Behalf Of John Esak
> > Sent: Tuesday, August 29, 2006 5:53 PM
> > To: Richard Tartaglia
> > Cc: Fplist (E-mail)
> > Subject: RE: Report Printing from @key / input
> processing
> >
> > 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
>
> When in input processing the form & formm commands
> may be used to create a
> report.
>
> One could create 2 forms for this, form1 a 5 line
> header and form 2 one line
> detail.
>
> From your array: dim foobar(20)
>
> Fill in the dummy fields for the header if they
> aren't static in the header
> form.
>
> If: 'print the header
> Then:formm form1
>
> Next you are going to fill in the dummy fields from
> you array or from lookup
> to a detail file. In the example below the then
> line should move data from
> your array to the dummy fields for printing.
>
> Details If: foobar(ct) ne ""
> then: formm form2 (set field values from the
> array);ct=ct+"1"
> if: ct le "19" and foobar(ct+"1") ne ""
> 'if next element blank
> drop to use form to close the spooler
> then: GOTO details
> if: 'this is the last line to print
> then: form form2;END
>
> You can add in what ever processing you need to do
> totals etc.
>
> When you use formm, the spooler is held open until
> you use form, at which
> time the spooler is closed.
>
> I have used this technique to print multi-page
> invoices where subtotal were
> needed at the bottom of each page along with a page
> #.
>
> Richard Kreiss
> GCC Consulting
>
>
>
>
More information about the Filepro-list
mailing list