Supplying Parameter Values to External Reports

How to:

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.


Top of page

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.

  1. From the Insert menu, select Controls, then click Push Button.

    The cursor changes into a crosshair.

  2. Click and drag the crosshair to create a push button and adjust it to the size you want.
  3. Right-click the button and select Create hyperlink.

    The Hyperlink Properties dialog box opens.

  4. Specify the text you want to display as the hyperlink in the Display Text input field.
  5. 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.
  6. Enter the external report procedure name in the Source field, or click the browse (...) button to browse to the procedure.
  7. Optionally, direct the output to a specific location by selecting Window or Frame in the Target Type field.
  8. Specify the Target/Template Name for the target frame or window.
  9. Click OK.

    The parameters for the report are automatically added to objects in the layout and displayed in the Parameters tab.

  10. From the File menu, click Run.
  11. 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.


Top of page

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.

  1. From the Insert menu, select Components, then click Image.

    The cursor changes into a crosshair.

  2. Click and drag the crosshair to position the image.

    The Get source file dialog box opens.

  3. Navigate to the image using the Look in drop-down list, select the image, and click Open.
  4. Adjust the image to the desired size and location.
  5. Right-click the image and select Create hyperlink.

    The Hyperlink Properties dialog box opens.

  6. 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.
  7. Enter the external report procedure name in the Source field, or click the browse (...) button to browse to the procedure.
  8. Direct the output to a window by selecting Window in the Target Type field.
  9. Specify the Target/Template Name for the target frame or window.
  10. Click OK.

    The parameters for the report are automatically added to objects in the layout and displayed in the Parameters tab.

  11. From the File menu, click Run.
  12. 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.


Top of page

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.

  1. 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.
  2. 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.

  3. Specify the text you want to display as the hyperlink in the Display Text input field.
  4. 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.
  5. Enter the external report procedure name in the Source field, or click the browse (...) button to browse to the procedure.
  6. Direct the output to the frame you inserted by selecting Frame in the Target Type field.
  7. Select the name of the frame you created from the Target/Template Name drop-down list.
  8. Click OK.

    The parameters for the report are automatically added to objects in the layout and displayed in the Parameters tab.

  9. From the File menu, click Run.
  10. 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.

  1. From the Insert menu, select Controls, then click Push Button.

    The cursor changes into a crosshair.

  2. 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.

  3. Right-click the button, and select Create hyperlink.

    The Hyperlink Properties dialog box opens.

  4. Type Run report in the Display Text input field.
  5. 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.
  6. Enter the external report procedure name in the Source field, or click the browse (...) button to browse to the procedure.
  7. In the Target Type field, select Window from the drop-down list.
  8. In the Target/Template Name field, select New window frame from the drop-down list.
  9. Click OK.

    The parameters for the first report are automatically added to objects in the layout and displayed in the Parameters tab.

  10. 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.
  11. Double-click the Name field in the Properties tab of the Properties window and enter frame1.
  12. 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.

  13. Type Run report 2 in the Display Text input field.
  14. 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.
  15. Enter the external report procedure name in the Source field, or click the browse (...) button to browse to the procedure.
  16. In the Target Type field, select Frame from the drop-down list.
  17. In the Target/Template Name field, select the name of the frame you created (frame1).
  18. Click OK.
  19. From the File menu, select Run.
  20. 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.

  21. 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.


WebFOCUS