printing a group of records

GCC Consulting gccconsulting at comcast.net
Tue Jan 31 09:07:17 PST 2006


 

> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com 
> [mailto:filepro-list-bounces at lists.celestial.com] On Behalf 
> Of Dan Snyder
> Sent: Tuesday, January 31, 2006 10:52 AM
> To: filepro-list at lists.celestial.com
> Subject: printing a group of records
> 
> 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

Dan,

One solution would be to create a form using dummy fields for your packing
list.  You could then do your lookup to the proper record, populate the
Dummy fields and the use form :packlist" to print your packing list.

A little fancier way to do this is break the form into 3 forms, a header, a
detail form (most likely 1 line, and a total form(if necessary).  If you are
using this method, set up a detail array with enough elements to cover the
number of detail line in the record.  Loop through the array filling the
detail dummy fields.

You would print using formm "header" first.

The again using formm "detail" as you loop through the array for each item
shipped.

Lastly use form "total" to print the last line and close the output so it
prints.

This is all done from within clerk.  The dummy fields MUST be cast in the
auto processing table so they are seen by your "form".

I have used this technique to print contracts and orders during the input
process.  Some of my orders are multi page and as I know how many detail
line I need to print, I can calculate the number of pages needed.  This
allows me to control what is printed on the last line, a total or "continued
on next page".

Richard Kreiss
GCC Consulting
 




More information about the Filepro-list mailing list