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. For testing purposes, however, you can use the Oracle WebLogic Server instance shipped with the Oracle Developer Suite. 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:
Copy the JSP Parameter Form and the Web report (paramform_
your_initials
.jsp
and emprev_param_
your_initials
.jsp
) into the following directory:
$BEA_HOME\servers\WLS_REPORTS\stage\reports\reports\web.war
Note:
BEA_HOME
is the directory in which Reports Builder is installed.In Reports Builder, open the file: $BEA_HOME\servers\WLS_REPORTS\stage\reports\reports\web.war\paramform_
your_initials
.jsp
.
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.
Save your report.
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.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.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.
When the Parameter Form displays, choose a department from the list. For example, choose Finance.
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
Click Run Report.
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
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.