Hi,
I am using the below code to display the jasper report from my
servlet. I am getting the blank pdf output. I have created this report using JasperStudio and able to run this report within studio. please help me.
FileInputStream fis = new FileInputStream("D:\\Tomcat10\\webapps\\tester\\reports\\test.jasper");
Class.forName("com.mysql.jdbc.Driver");
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/tester?user=test&password=test123");
JasperReport jasperReport = (JasperReport) JRLoader.loadObject(fis);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, null, connection);
JasperViewer.viewReport(jasperPrint,false);
fis.close();
Thanks in advance.