Very often it’s
necessary to create
several reports
with the similar
structure, which
differ only in one
or several values.
XL Report Builder
allows to create
such reports by
defining such values
as «PARAMETERS».
Every time at executing
such reports it
will be offered
for the user to
change the values
of these parameters
in the dialog mode.
To
get such a possibility
you should choose
the object Report
in the objects tree
and add the object
Parameters
by one of the possible
ways:
- Using
the main menu
of the program
choose File\New\Parameters
- Using
the pop-up menu
of the object
Report
choose New\Parameters
As
soon as the user
does this, a new
object – Parameters
will appear in the
tree of objects,
and two properties
of this object will
appear in the window
of properties (look
at the figure below).
The first property
– Caption
– allows to
identify parameters
values in the file-template.
The second property
– Parameters
– is a frame
of the parameters
of this report.


|
Before
adding new
parameters
to the report,
you should
decide what
parameters
exactly you
need. Let’s
imagine, that
SQL-script
contains two
parameters
(FromDate
and ToDate),
which begin
from the symbol
«:».
During the
report execution
process the
values (which
the user will
be asked to
specify) will
be put instead
of these two
parameters.
To
add parameters
you need to
choose the
property Parameters
of the object
Parameters
and press
the button
with suspension
points, which
appears to
the right.
As a result
of these actions
a form «Parameters
Editor»
will appear
(look at the
figure to the left).
This form
contains a
table, which
consists of
two columns:
Caption |
Parameter
caption,
which
will be
shown
at the
beginning
of the
report
execution
process. |
Name |
Parameter
name,
which
must be
the same
with the
parameter
name in
the SQL-script. |
|
There
are buttons below,
using which you
can add [Add], insert
[Insert] or delete
[Delete] parameters
from the list. You
can also change
properties of any
parameter by pressing
the button with
suspension points
to the right from
the parameter name.
After changing the
list of parameters
you can confirm
your actions by
pressing the button
[OK] or cancel them
- [Cancel]. To add
the necessary parameters
you should use the
button [Add].
After
you’ve added
parameters in such
a way, in the table
of the form «Parameters
Editor» will
appear the list
of these parameters.
And next to the
property Parameters
of the object Parameters
will appear an inscription,
that shows the number
of the parameters,
added into the report
(for example, «(2
Items)»).
Parameters, added
in such a way, can
be used in SQL-queries
as script parameters,
and for output to
any place of the
MS-Excel report
as parameters values.
[
Back
to Table of Contents
]
|