42.5 Deploy the JSP Parameter Form and the Target Report

To deploy the JSP Parameter Form and the target JSP-based Web report, you must copy paramform_your_initials.jsp and emprev_final_your_initials.jsp to the deployment directory of your Application Server. Once you have placed the target report in the desired directory, you can then modify the Parameter Form to point to the report location.

For more information on deploying a JSP-based Web report, refer to the Oracle Fusion Middleware Publishing Reports to the Web with Oracle Reports Services manual.

To set up and deploy the JSP Parameter Form and the target report:

  1. Copy the JSP Parameter Form and the Web report (paramform_your_initials.jsp and emprev_param_your_initials.jsp) into the following directory:

    $DOMAIN_HOME\servers\WLS_REPORTS\tmp\_WL_user\reports_11.1.1.2.0\dir_name\war

    dir_name is a randomly generated directory name for each deployment instance.

    Note:

    BEA_HOME is the directory in which Reports Builder is installed.

  2. In Reports Builder, open the file: $DOMAIN_HOME\servers\WLS_REPORTS\tmp\_WL_user\reports_11.1.1.2.0\dir_name\war\paramform_your_initials.jsp.

  3. In the Web Source view, modify the action for the form so that when the user clicks Run Report, the emprev_param_your_initials.jsp report executes based on the selected parameters. The code should look like this:

    <form name="form1" method="post" action="/reports/rwservlet">
        <input type="hidden" name="report" value="reportname.rdf">
        <input type="hidden" name="destype" value="destype">
        <input type="hidden" name="desformat" value="desformat">
        <input type="hidden" name="userid" value="db_connect_string">
        <input type="submit" name="Submit" value="Submit">
    </form>
    

    Notes:

    • In the above code, the action attribute assumes that the report is located in the directory we specified in the above steps.

    • The Parameter Form developed in this chapter can also be used to execute a paper report instead of a Web report. To do this, use the following code:

      <form name="form1" method="post"
      action="/reports/rwservlet?report=report
      _name.jsp&destype=destype&desformat=desformat">
      
    • For more information on deploying JSP-based Web reports and paper reports, refer to the Oracle Fusion Middleware Publishing Reports to the Web with Oracle Reports Services manual.

  4. Save your report.

  5. Start your Oracle WebLogic Server instance.

    • On Windows, Go to the following directory

      • ORACLE_HOME\Middleware_HOME\user_projects\domains\<your_domain>
        

        Double-click startWebLogic.cmd

      Where, "<your_domain>" is the domain created by you.

    • On UNIX, start the shell script:

       ORACLE_HOME/Middleware_HOME/user_projects/domains/<your_domain>/startWebLogic.sh
      

    Where, "<your_domain>" is the domain created by you.

    Tip:

    The Oracle WebLogic Server instance starts once the containers for Java EE have been initialized.

  6. In a Web browser, type the URL for the Parameter Form:

    http://computer name:port/reports/paramform_your_initials.jsp?userid=userid/password@database name
    

    In our example, we would use:

    http://mycomputer-pc:8888/reports/paramform_your_initials.jsp?userid=hr/hr@orcl
    

    Note:

    The connect string you type in the URL is for the database you used to create the data model in Section 42.3.1, "Create a data model manually for the Parameter Form". For the purposes of this example, we have used plain text to pass the connect string. You can find more information about security in the chapter "Securing Oracle Reports Services" in the Oracle Fusion Middleware Publishing Reports to the Web with Oracle Reports Services manual.

  7. If the Single Sign-On login page displays, enter your Single Sign-On user name and password. For more information about OracleAS Single Sign-On, see the Oracle Fusion Middleware Publishing Reports to the Web with Oracle Reports Services manual.

  8. When the Parameter Form displays, choose a department from the list. For example, choose Finance.

  9. In the Login ID field, type the connect string for the database schema that the emprev_param_your_initials.jsp report uses. For example, hr/hr@orcl:

    Figure 42-6 JSP Parameter Form with selections

    Description of Figure 42-6 follows
    Description of "Figure 42-6 JSP Parameter Form with selections"

  10. Click Run Report.

  11. The employee salary report displays with a graph at the top, and should look like this:

    Figure 42-7 Sample employee report based on user parameters

    Description of Figure 42-7 follows
    Description of "Figure 42-7 Sample employee report based on user parameters"

    Note:

    If you are not sure whether your report appears as it should, try using the files we have provided, paramform.jsp and emprev_param.jsp and follow all the steps in this section to deploy the Parameter Form and the Web report.