Output processing, lookups, and system calls

John Esak john at valar.com
Tue Aug 23 20:12:49 PDT 2005


>> tem" subroutine, the getnext code would accomplish what you want
>> without it. However, I think this code would still work...  So, I think
>> there is some other problem going on.
>>
>>
> Thanks for the advice John.  I will clean it up.

>> Meaning, if this code were being done in *clerk, the PRINT would function
as
>> I think you expect it to work here. Otherwise, if you are running this in
>> *report as you say, the PRINT might give you some strange results. I
think
>> what you would want to be using in this case is FORM. I don't think the
>> PRINT command is meant to be used more than once in output processing.
>> Could be wrong about this, maybe, but I think this is where the problem
>> lies.


> I am running this code from *report.  The strange thing is that the ascii
file is generated
> correctly every time.  The pdf file is also generated correctly when there
are no lookup and
> getnext commands that run.  I walk through the code and watch the system
command run, but no
> pdf file is created.  If I run the same command from the command line, the
pdf is created ok,
> and if I re-run the report for an invoice with no invoice items (just time
entries so the above > lookup returns no invoice items), the pdf is created
successfully.  It is like filePro fails to > execute the command completely,
but I see no error.  The system command is:

> ::system "/appl/fp/text2pdf"<if


If you  want to post the whole table, I'll give it a full generic try on my
system.

Barring that. I'm still thinking it has something to do with hitting the
PRINT command inside the getnext loop. The PRINT command on an output table
tells filePro to "include" the record in those that get printed on the
output format. (and include that record's values in any filePro-kept
subtotals/totals)  If there *is* a PRINT command on an output table, and the
processing pointer does not fall through it as an executable "then" line,
that particular record will not be printed on the format. If the PRINT is
encountered on an executable "then" line (in other words the if condition is
TRUE) then it will be printed. So really, the best and almost only use of
the PRINT command is to include or not include records on a printout. Now,
I've been scratching my head wondering what would happen if a PRINT command
is encoutnered multiple times on a particular record. I want to assume that
it would be just like encountering it one time only.  However, some other
thing could be happening.  Only way to tell exactly what, is to see the
whole table. It can't be too long, right? Why not post it up here.  Or jump
into the FP Room and we can take a look at it there.

John

--
John Esak
Visit The FP Room www.tinyurl.com/97y9u 24/7

Author of:
The filePro Survivor Series
Complete video training on CD for filePro.
Samples at: www.valar.com/training



More information about the Filepro-list mailing list