Kbase 5510: Running RESULTS-genn'd code outside Results;NO QUERY
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
Running RESULTS-genn'd code outside Results;NO QUERY
910719-elp50
5. Generated Reports, Labels and Export Code
5.1. When Code is Generated
Although RESULTS stores code in rep?????.p, lbl?????.p and exp?????.p,
it never directly runs that code. It always regenerates the procedure
as a temporary file in the current directory ("_qbf.p") and runs this
new code. This ensures that the code always is up-to-date as far as
permissions goes.
5.2. Can I Run Query Forms Outside of RESULTS?
No. The query forms only work within RESULTS, since they need the
environment RESULTS provices - translation support, where-clause
builder, etc.
5.3. How To Run Reports, Labels or Exports Outside of RESULTS
Is it possible to run code directly from the directory? Yes,except
when "ask for a value at run-time" is used. In that case, the stored
code is not executable. When a report with run-time values is"Run",
RESULTS asks for values, and then generates code with the values
inserted directly into the WHERE-clause.
How do you do this? Try:
DEFINE NEW SHARED VARIABLE qbf-total AS INTEGER NO-UNDO.
OUTPUT ......... /* whatever, such as TO TERMINAL PAGED */
RUN rep00001.p. /* or exp00001.p or lbl00001.p */
OUTPUT CLOSE.
RETURN.
This is in the RESULTS books, under "Using the Generated Report,
Labels and Data Export Code" (and yes, it's been there all along).
For V5, see section 8.6, page 8-10 (November 1990 printing). ForV6,
see section 9.8, page 9-18 (May 1991 printing).
5.4. Sharing Reports, Labels, Exports Between Users (V6 only)
Suppose you have some standard reports you want to share between
users. V6 RESULTS supports read-only sharing of reports. You can
read any report directory of any user, provided you know the name
and location of the .qd file.
What you would do to create a shareable user directory is
create the reports, etc. you want to appear in that directory.
Then, copy the
.qd and all rep?????.p, lbl?????.p and exp?????.p files into a common
location, accessible by each user.
To read in the shared definitions, select the first entry on the
"Get" scrolling list. It will be something called "<<get report(or
label or export) from another directory>>". After picking this, you
will get a dialog box asking for a different .qd file name. Type in
the file name of the shared .qd file (RESULTS will search the
PROPATH). You will then see all entries in that directory listed.
Pick one, and it loads as if it had been defined locally.
NOTE: If you have a code that you've modified outside of Results you
cannot run it in Results again.
The reason is that Results doesn't read the 4GL code in the .p
file, it reads the information within the comments and
regenerates the 4GL everytime the report is run. We do not
support changing any of the information that is within
the comments.
Progress Software Technical Support Note # 5510