Supplying Parameter Values to External Reports
You can supply parameters to external reports the same
way you apply them to reports created with the Report
Painter. The HTML
page can also contain multiple reports associated with a common
set of parameters. Launch mechanisms such as a push button, hyperlink,
or image can be associated to external reports that contain different
sets of parameters. You can also update and target parameters for
an external report to a frame or window directly within your HTML
page.
Before you can supply parameter values to an external report,
you must create a hyperlink to the report and associate a launch
mechanism to it. After you associate a launch mechanism, such as
a push button, hyperlink, or image, to the external report, the
report layout is populated with the parameters.
x
Procedure: How to Supply Parameter Values to External Reports With a Push Button
In this procedure, you will create a push button to launch
an external report and target the output to a window.
-
From
the Insert menu, select Controls, then click Push
Button.
The cursor changes into a crosshair.
-
Click
and drag the crosshair to create a push button and adjust it to
the size you want.
-
Right-click
the button and select Create hyperlink.
The Hyperlink Properties dialog box opens.
-
Specify
the text you want to display as the hyperlink in the Display Text input
field.
-
To set
the action of the hyperlink to execute an external report, select the New button,
then select External procedure from the Action
drop-down list.
-
Enter
the external report procedure name in the Source field, or click
the browse (...) button to browse to the
procedure.
-
Optionally,
direct the output to a specific location by selecting Window or Frame in
the Target Type field.
-
Specify the Target/Template Name for the target frame or window.
-
Click OK.
The parameters for the report are automatically
added to objects in the layout and displayed in the Parameters tab.
-
From
the File menu, click Run.
-
Click
the push button to view the external report.
The report opens in a separate window as
you specified in the Hyperlink Properties dialog box for that push
button.
x
Procedure: How to Supply Parameter Values to an External Report With an Image
In this procedure, you will insert an image that will launch
an external report when you click it. You will target the output
to a window.
-
From
the Insert menu, select Components, then
click Image.
The cursor changes into a crosshair.
-
Click
and drag the crosshair to position the image.
The Get source file dialog box opens.
-
Navigate
to the image using the Look in drop-down list, select the image,
and click Open.
-
Adjust
the image to the desired size and location.
-
Right-click
the image and select Create hyperlink.
The Hyperlink Properties dialog box opens.
-
To set
the action of the hyperlink to execute an external report, select the New button,
then select External procedure from the Action
drop-down list.
-
Enter
the external report procedure name in the Source field, or click
the browse (...) button to browse to the
procedure.
-
Direct
the output to a window by selecting Window in
the Target Type field.
-
Specify the Target/Template Name for the target frame or window.
-
Click OK.
The parameters for the report are automatically
added to objects in the layout and displayed in the Parameters tab.
-
From
the File menu, click Run.
-
Click
the image to view the external report.
The report opens in the window you specified
in the Hyperlink Properties dialog box for that hyperlink.
x
Procedure: How to Supply Parameter Values to an External Report With a Hyperlink
In
this procedure, you will create a frame and target report output
from an external report to it. You will also create a hyperlink
to launch the external report.
-
From the Insert menu, select Components,
then click Frame. Click and drag the crosshair
to create a frame and adjust it to the size you want. Enter a name for
the frame by double-clicking the Name field
in the Properties tab of the Properties window.
-
From
the Insert menu, select Components, then
click Hyperlink. Click and drag the crosshair
to create a hyperlink and adjust it to the size you want.
The Hyperlink Properties dialog box opens.
-
Specify the text you want to display as the hyperlink in the
Display Text input field.
-
To set
the action of the hyperlink to execute an external report, select the New button,
then select External procedure from the Action
drop-down list.
-
Enter
the external report procedure name in the Source field, or click
the browse (...) button to browse to the
procedure.
-
Direct
the output to the frame you inserted by selecting Frame in
the Target Type field.
-
Select
the name of the frame you created from the Target/Template Name
drop-down list.
-
Click OK.
The parameters for the report are automatically
added to objects in the layout and displayed in the Parameters tab.
-
From
the File menu, click Run.
-
Click
the hyperlink to view the external report.
The report opens in the frame you specified
in the Hyperlink Properties dialog box for that hyperlink.
Example: Supplying Parameter Values to Multiple External Reports
In this example, you will add two reports to a layout.
You will associate a push button to one report and target the output
to a window. You will associate a hyperlink to the second report
and target the output to a frame.
- From the Insert
menu, select Controls, then click Push
Button.
The cursor changes into a crosshair.
- Click and drag
the crosshair to create a push button and adjust it to the size
you want.
A push button is created in the layout and assigned
the name buttonn, where n is a number.
- Right-click
the button, and select Create hyperlink.
The
Hyperlink Properties dialog box opens.
- Type Run
report in the Display Text input field.
- Set the action
of the hyperlink to execute a report by clicking the New button
and selecting External procedure from the
Action drop-down list.
- Enter the external
report procedure name in the Source field, or click the browse (...) button
to browse to the procedure.
- In the Target
Type field, select Window from the drop-down list.
- In the Target/Template
Name field, select New window frame from
the drop-down list.
- Click OK.
The
parameters for the first report are automatically added to objects
in the layout and displayed in the Parameters tab.
- From the Insert
menu, select Components, then click Frame.
Click and drag the crosshair to create a frame and adjust it to
the size you want.
- Double-click
the Name field in the Properties tab of the Properties window and
enter frame1.
- From the Insert
menu, select Components, then click Hyperlink.
Click and drag the crosshair to create a hyperlink and adjust it
to the size you want.
The Hyperlink Properties dialog box opens.
- Type Run
report 2 in the Display Text input field.
- Set the action
of the hyperlink to execute a report by clicking the New button
and selecting External procedure from the
Action drop-down list.
- Enter the external
report procedure name in the Source field, or click the browse (...) button
to browse to the procedure.
- In the Target
Type field, select Frame from the drop-down list.
- In the Target/Template
Name field, select the name of the frame you created (frame1).
- Click OK.
- From the File
menu, select Run.
- Click the push
button to view the first external report.
The report opens in
a separate window as you specified in the Hyperlink Properties dialog
box for that push button.
- Click the hyperlink
to view the second external report. The report opens in the frame you
specified in the Hyperlink Properties dialog box for that hyperlink.