Birt:param tag, need help [message #911885] |
Wed, 12 September 2012 10:04  |
Eclipse User |
|
|
|
Hello All,
I am working with IBM and using birt tool to generate a report on one of my assignments. I am facing problem with what am trying to accomplish. Here is a general overview of my requirement.
I am creating two jsp pages say index.jsp and display.jsp.
On index.jsp, am taking an input from the user say customer number and on display.jsp, am embedding a birt report having a variable CustNum.
I want the birt report on display.jsp page to take value that was entered by user in index.jsp and generate a report for that Customer only.
My understanding is I need to use the birt:param tag to set the value of the report parameter. But it just wont work.
Here is the code:
index.jsp
<% String CustNum = "";
request.setAttribute(CustNum, "CustNum"); %>
</head>
<body>
<form action="display.jsp" method="post">
CustomerNumber <input type="text" name="CustNum" />
<input type="submit" value ="Submit" />
display.jsp
<% String CustNum = request.getParameter("CustNum");
out.println(Integer.parseInt(CustNum));
%>
<birt:viewer id="birtViewer"
reportDesign="testBirt.rptdesign"
pattern="run"
height="450"
width="900"
format="html"
showParameterPage="False"
baseURL="/birt">
<birt:param name="CustId" value="<%=CustNum%>" ></birt:param>
</birt:viewer>
I tried using birt:param outside the viewer tag but i wont do anything. Inside the viewer tag, it gives an java lang error.
Any help would be much appreciated. I am kind of stuck on this since yesterday.
Thanks
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03563 seconds