Ruskin
17th September 2002, 00:23
I must be missing something simple here, but can't figure out what.

There is a predefined variable "spool.pr.line" which is filled with the contents of the data being sent to the report. According to the help, this is set before spool.line and after this function runs, the spool.pr.line is cleared. I am trying to read the value of spool.pr.line in the report script, but it seems to be blank. I have tried the following in the before layout section of my detail.1 layout;

import("spool.pr.line" tmp.var)
message(tmp.var)

and

message(spool.pr.line)

but both messages are blank. I have tried putting the report into debug, but clicking on the spool.pr.line variable gives the message;

Array spool.pr.line is empty

Array??? (I assume they mean a two dimensional array).

Question 1.
Is there anyway to read the value of this variable, or is there another way to find the string of data being sent from the program script?

Question 2.
How does spool.pr.line know what to send. Is it a delimited record that matches your input fields? Is it a delimited record of all fields selected in the program script? Is it a delimited record of only the fields on the layout that is being printed (unlikely, as it would have to include the before and after field layout fields as well)?

gfasbender
17th September 2002, 01:32
Compile your report in debug and take a look at the source file it creates. I think it will help you in answering your question and be quite enlightening.

Ruskin
17th September 2002, 02:43
Thanks for that. I should have tried that first....

There is an "undocumented" predefined variable, used in the report script, that holds the record. It is decoded in the;
r.read.seq.file()
function of the script and is called;
r.recbuf$

The fields of this record buffer are concatenated together, separated by the "^B" character and are based on the input fields of the report....

Answers all my questions, so thanks again.