Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JasperReports through servlets

843833Dec 6 2006
hi
i am trying to create jasper report through servlet. For tht i have used iReport for creating the gui of the report which gives jrxml file which is in turn used to create the report n export it to the desired format. i am exporting it to the PDF Format. My servlet is working fine when i use Tomcat & JBoss for deploying it. but when i run the same code with Sybase EAserver 4.0 the servlet is executed but the report is not exported in Pdf format instead it shows encrypted Text on the browsers window?
Here's the code:

Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
con = DriverManager.getConnection("jdbc:microsoft:sqlserver://siddhant:1433;DatabaseName=ncstdb","cstuser","sengdake");
JasperDesign jd = JasperManager.loadXmlDesign(rs);
JasperReport jr = JasperManager.compileReport(jd);
JasperPrint jp = JasperFillManager.fillReport(jr,params, con);
OutputStream output =servletOutputStream;
JasperExportManager.exportReportToPdfStream(jp, output);

Can nebody please Help me Out.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 3 2007
Added on Dec 6 2006
0 comments
183 views