The steps in this section will show you how to build a simple Parameter Form using plain HTML. You will then modify this HTML Parameter Form in Reports Builder so that you can call the Parameter Form from your JSP-based Web report.
If you do not want to create your own HTML file, you can open the sample HTML file we have provided in the Source directory, called
paramform.html, then view the source code.
To create a simple Parameter Form in HTML:
In a text editor or HTML editor, create an HTML page that contains a form. The form should contain a list of values, a field, and a button. The code for this form can look something like the following:
<form name="form1" method="post" action=""> <h2>Parameter Form</h2> <p>Choose a department from the list, then click the <b>Run Report</b> button to show salary details for each employee in that department.</p> <select name="p_department" size="1"> <option value="1">a</option> </select> <br> <input type="text" name="userid" value="hr/hr@db-connect"> <br> <input type="submit" name="Submit" value="Run Report"> </form>
Note:Although you can use the above code, you will need to change the
useridvalue to reflect the connection information for your data source. You can also copy and paste the HTML code from the provided file, called
simplejsppf/scriptsdirectory, then modify it in a text or HTML editor.
Save the HTML file as
.html. When you display this HTML file in a Web browser, it should look similar to the following image: