on 02-14-2007 4:40 PM
Hello,
I have a query which I want to call from a servlet. I have a parameter in the query Equipment = '[Param.1]'
I tried using the following code for the servlet page, but it did not return anyting from the query even though xyz was a valid equipment number.
<html>
<body>
<SERVLET NAME="Illuminator">
<PARAM name="QueryTemplate" value="UserTemplates/TESTSQL">
<PARAM NAME="Content-Type" VALUE="text/xml">
<PARAM NAME="StyleSheet"
VALUE="http://localhost/Illuminator/StyleSheets/IllumRowsetHTML.xsl">
<PARAM name="Param.1" value="xyz">
</SERVLET>
</body>
</html>
Also, how can I call the servlet page from an html webpage and pass the Param.1 in a url. I have a simple webpage which has a text box and a button, on click I want to open the servlet webpage and pass it the value from the text box.
Thanks,
Mahwish
Add in the body of your irpt page the text {Param.1}.
What shows up?
What is the actual URL for the page?
It should be something like http://servername/MyPage.irpt?Param.1=xyz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mahwish,
If you still can't get it to work - post the query template's xml code so that I can take a look.
Joe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Perhaps you can help me out since you worked it out with your Java guys. I have a servlet like you that has 3 parameters. I have a form that is calling the servlet page. How do I send the values from the form to the servlet?
Page 1 form has 3 elements:
<p>Customer Number: <input type="text" name="txtCustomer" size="20"></p>
<p>Sales Organization: <input type="text" name="txtSalesOrg" size="20"></p>
<p>Material: <input type="text" name="txtMaterial" size="20"></p>
Page 2 is an .irpt with servlet:
<SERVLET NAME="Illuminator">
<PARAM NAME="QueryTemplate" VALUE="Aware/SalesOrderQuery">
<PARAM NAME="StyleSheet" VALUE="http://localhost/Illuminator/StyleSheets/IllumRowsetTinyHTML.xsl">
<PARAM NAME="Content-Type" VALUE="text/xml">
<PARAM NAME="MappedParamTarget.1" VALUE="Customer=''">
<PARAM NAME="MappedParamTarget.2" VALUE="SalesOrganization=''">
<PARAM NAME="MappedParamTarget.3" VALUE="Material=''">
Thanks for your assistance.
Kim
Kim,
Try this:
On the form have an action which calls the irpt page, such as:
<form name = "form1" action="Page1.irpt" method="post">
<input type="text" name = "txtCustomer">
<input type="text" name = "txtSalesOrg">
<input type="text" name = "txtMaterial">
</form>
On the irpt page make sure the txt element name matches your variable name as such, assuming that on your query Param.1 = Customer, Param.2 = Sales Org, Param.3 = Material
<SERVLET NAME="Illuminator">
<PARAM name="QueryTemplate" value="UserTemplates/Query1">
<PARAM NAME="Content-Type" VALUE="text/xml">
<PARAM NAME="StyleSheet" VALUE="http://localhost/Illuminator/StyleSheets/IllumRowsetHTML.xsl">
<PARAM name="Param.1" VALUE=''>
<PARAM name="Param.2" VALUE=''>
<PARAM name="Param.3" VALUE=''>
</SERVLET>
Let me know if this works for you.
Mahwish
In your query template if you set Param.1 = xyz on the Parameters tab - do you get results?
Joe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.