Saturday, December 16, 2017

Making Report Using JSP

U can generate a report in servlet . Simpley u execute the query in servlet and print the resultset in servlet.using printWriter object. Now the output will come in html format.

if u want the same output in excel then put

response.setContentType("application/vnd.ms-excel");
for pdf output put

response.setContentType("text/pdf");

Don't use jsp directly to display a report as it may print some unwanted comments.

Otherwise u can go 4 some reporting tools like jasperreport ,ireport or pentaho reports

all these are open source tools so u can download them

Only u have to learn how to make reports using these tools

try pentaho.org

No comments: