|
Parameters and select/omit criteria - what's the difference?
Selection Criteria:
Selection Criteria are defined
using the "Select" tab of Jacana's Report Specification
dialog. Here, you choose a field to be used as a selector, and
then define "rules" against which the data base values
are to be tested. These "rules" control which records
from the data base are chosen for processing by the Jacana report
program. They act as a filter - allowing the chosen records into
the report and keeping other records out. Show
me
Almost any field in the report can
be used for this purpose including Derived fields and Calculation
fields. The only requirement is that the field exists in one of
the data groups and not the special control group (Group: CTL).
If a Selection criterion is
defined for a field from the Based-On-File (BOF) of the Subset, or
from another "node" file (a node file is the target file
of a one-to-many relationship) then the Report Writer will attempt
to use the OPNQRYF command to improve the performance of the
extract program.
Where you have alternatives, try
not to use calculation fields as the basis of your selection
criteria as this will almost always make your report run more
slowly. Remember, Jacana reports cannot make use of efficient
OPNQRYF commands on calculation fields.
Parameters:
Parameters are defined using the
"Parameters" tab of Jacana's Report Specification
dialog. They can be used for many purposes, but there are only two
ways in which to use them:
- Calculations and
- Print Line Conditioning
You can use a parameter directly
to control a print line and thereby, to control the report
presentation. For example, a parameter can be used to invite the
user to choose between a Summary and a Detail report format. All
you need to do is to condition the detail level print lines (in
Jacana's Layout window) based upon what the user enters into the
parameter at run time.
In suitable Subsets, you can use a
parameter to enhance a ranking report by allowing the user, at run
time, to tell the report writer how many "top" ranked
customers to print (e.g. a "top-ten" report). We'll show
you how to build a "top-ten" report in a future Jacana
e-news article.
Parameters can also be used to
control the evaluation of calculations. For example, let's say
that you have a report that shows sales by month over the last
year. You want to see the effect, at every level of summary within
the report, of an across the board increase of "x"
percent in sales. You may want to try several values or
"x" to help you determine where to set next year's sales
targets in order to generate a given level of revenue.
By specifying a numeric parameter,
the run-time user can set a percentage value and you can use that
value in a calculation to compute a value for each sales record
the "x" percent greater than the value held in the
file.
Remember that Jacana's
"Run-time interface" feature allows you to build text
lines around your selection criteria and parameters to guide the
run-time user on how to use the parameters you have designed into
the report to get the report they want.
Further details on parameters and
selection can be found in the JuMPZone on our website -
specifically the Jacana Training Exercises:
- Exercise 4 - More Report Specification
Functions
- Exercise 9 - Record Selection
& Summarization in detail
Do you have any specific questions
you'd like answered? Let us know momentum@jacana.com
|