Error with JasperViewer

View: New views
2 Messages — Rating Filter:   Alert me  

Error with JasperViewer

by Sathish Gopal :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everyone,

I'm new to Jasper reports. I created a sample report using i'report. I'm trying to display this report in web application. Our web application uses JSF-richfaces.
I'm trying to open jasper report via Jasper viewer on the client side.

In my backing bean i create a Jasperprint object as given below..

                        jasperPrint = JasperFillManager.fillReport(jasperReport, reportMap,ds);
                        JasperViewer.viewReport(jasperPrint);


The jasperPrint object is passes to the JasperViewer and it open the report correctly but it works on the server side (as expected). I can see the report without any issues.

Now the same jasperprint object is used to display the report on the client via the Applet.
I'm using PDFServlett and EmbeddedViewerApplet to do this. This gives me a strange error

java.io.StreamCorruptedException: invalid stream header 2550446.

BTW: My Tomcat server and my client(browser) uses the same JRE version.

I'm completely clueless. Ur help is appreciated.




How to open jasperviewer at client side

by ranjanprasad :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all! Using  jasper report I develop a project with struts 1.2 Frame work ; My project generate a PDF  report based on a specified database.
The problem is it open the PDF file on the Server Terminal(side) i.e (http://localhost:8084/GeoTrak/getdetailReportPage.do)   but not on  the client Terminal(side) i.e (http://192.168.100.35:8084/GeoTrak/getdetailReportPage.do).
Does anyone knows how to resolve this situation ? Best regards Ranjan

Code ……Struts Action class.:……………………………..

String fullPath=getServlet().getServletContext().getRealPath("reports/"+pf.getReportList()+".jasper");            
 JPrint=JasperFillManager.fillReport(fullPath,params,con);
 JasperViewer.viewReport(JPrint,true);  
 con.close();