hi all


M

mamta81

how to call a .jasper file from jsp.(application server tomcat).Do i
hav to compile the jrxml file in ireport tool and then copy the
new .jasper file in the required folder? My doService() method looks
like this


protected void doService(HttpServletRequest request,
HttpServletResponse response) throws IOException {

String reqfor=(String)request.getParameter("requestfor");
System.out.println("Requestfor parameter obtained:"+reqfor);
Map<String, String> parameters=new HashMap<String, String>();
if (reqfor.equals("indrep")) {
String rnum=(String)request.getParameter("reqnumber");
//System.out.println("value of reqnumber::::::"+rnum);
parameters.put("REQ_NO", rnum);
char tp=findRepType(rnum);
if (tp == 'F') {
//System.out.println("report type is Foreign");
handleSubmit(request, response,
"IndRepForeign.jasper", parameters);
} else if (tp == 'L') {
//System.out.println("report type is Local");
handleSubmit(request, response, "IndRepLocal.jasper",
parameters);
} else {
System.out.println("unable to get report
type.......");
}
} else if(reqfor.equals("acmi")) {
handleSubmit(request, response, "Avgerage Consumption of
Medical Items.jasper", parameters);
} else if(reqfor.equals("stin")) {
handleSubmit(request, response,
"stock_inventory_new.jasper", parameters);
}
else if(reqfor.equals("idfba")) {
String acno=(String)request.getParameter("accountno");
//System.out.println("account No:"+acno);
parameters.put("IND_BUD_ACNO", acno);
handleSubmit(request, response, "Indent details for budget
account.jasper", parameters);
} else if(reqfor.equals("ghguestlist")) {
String repdt=(String)request.getParameter("repdate");
//System.out.println("reportdate:"+repdt);
parameters.put("RepDate", repdt);
handleSubmit(request, response, "gh_dayreport.jasper",
parameters);
} else {
System.out.println("Requestfor parameter not
obtained...");
}
}//end doService


i am getting ("Requestfor parameter not obtained..."); though i hav
kept the required stock_inventory_new.jasper file in the corresponding
folder.
what else do i have to do???
Please help
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top