Output processing, lookups, and system calls

Dave Burris dave at kwburris.com
Tue Aug 23 14:59:55 PDT 2005


Hello,

filePro v5.0.11D4 on OpenServer 5.0.6

I have a report that prints invoices to a file in ascii and then runs a 
system call to convert the file to pdf format.  However, if I run a 
lookup and getnext command prior to running the system call to create 
the pdf file, the system call fails.  If I comment out the lookup and 
getnext commands, the system call succeeds and the pdf is created.  Is 
there are rule about using lookups in output processing? 

Below is the code with the lookup and getnext command.  It iterates 
through each invoice line item and prints out the taxable items.

Thanks,
Dave Burris

taxitms:'Retrieve the taxable line items and print them::
::lookup items = kwb_invoice_line_item k=1 i=E -nx:
:not items 'No hardware or software:return:
::gosub taxitem:
:'Print the materials subtotal:gosub mater:
::pt="":
::return:
taxitem:'Iterate through and print the taxable items only::
:not items:close items; return:
:items(2) ne 1:close items; return:
:items(9) eq "N" 'Only print the taxable items:getnext items; goto taxitem:
:'Set the variables and print:pt=items(3)&" "&items(5)&" "&items(4)&" 
"&items(6):
::print:
:items(11) ne "" 'If shipping & handling exist, print an indented 
line:pt=" SHIPPING "&items(11); print:
::getnext items; goto taxitem:




More information about the Filepro-list mailing list