printing a group of records
Jeff Harrison
jeffaharrison at yahoo.com
Tue Jan 31 08:32:32 PST 2006
--- Dan Snyder <dan at macdatatech.com> wrote:
> Hello everyone,
>
> I'm trying to improve some of our old filePro
> files/applications. I've run
> into a printing problem that is common across many
> of these files and I was
> hoping someone can point me in the right direction.
>
>
> Example Situation
> ----------------------
> We have a "shipping" file that stores both header
> and detail information in
> one record. To create a packing list with multiple
> line items we have to
> create multiple records. Then to print the packing
> list, we have to exit
> out of the current record and screen and go all the
> way back to the main
> filePro menu. Then select "D - Request Output",
> select "shipping", load a
> saved selection set, then update the selection set
> with the proper packing
> list number.
>
>
> Goal
> -----
> I understand that the best solution would be to
> redesign the application
> from scratch as two separate files one for the
> header and one for the
> details. However, I don't have time to do that.
> Right now, I'd just like
> to improve efficiency by simplifying printing so
> that when a user is in the
> shipping file, looking at a record, they could press
> "P" and have the
> packing list print. The programming would have to
> grab the packing list
> number from the current record, select all records
> with that packing list
> number and print the "packlist" output. Sounds
> simple, but this filePro
> novice can't get it to work.
>
>
> Attempted Solution and Problem
> --------------------------------
> I tried the following command in a @keyP section of
> the input processing
> table.
> system "/appl/fp/dreport shipping -f packlist -v
> packlistsel -a -u
> -r"<18
> This seems to work, meaning it selects the proper
> number of records for the
> packlist number on the current screen. The problem
> is that it locks up at
> generating output. By hard coding the -r value I
> found that it only locks
> up when you are looking at the record you want to
> print. For example: If
> you are looking at packing list #2 and the script is
> hard coded to print
> packing list #3 it prints fine. However, if you are
> looking at packing list
> #3 and the script is hard coded to print packing
> list #3, it locks up at
> generating output.
>
> Can anyone tell me what I need to do to keep it from
> locking up?
>
>
> Selection table packlistsel
> ---------------------------
> aa = @PM
> if 18 eq aa
> select
> end
>
>
>
> Thank you,
>
> Dan Snyder
> IT Manager
> Mercury Electronics
> 717-854-9557 ext.224
>
>
Dan, assuming you are running *Nix you should be able
to get what you want by simply running your system
command in the background. Just add an ampersand to
the end of the command and redirect the stdout and
stderr as follows:
sysem "/appl/fp/dreport shipping -f packlist -v
packlistsel -a -u -r"<18 <">/dev/null 2>/dev/null"
<"&"
Good Luck.
Jeff Harrison
jeffaharrison at yahoo.com
Author of JHExport and JHImport. The easiest and
fastest ways to generate code for filePro exports and
imports.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Filepro-list
mailing list