View Single Post
  #1 (permalink)  
Old March 13th, 2007, 11:13 PM
dgmanu dgmanu is offline
Registered User
 
Join Date: Aug 2006
Location: Mangalore, , India.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem in report ptrinting

hi ,
      am using struts and jasper reports on my project, now i was having problem that whenever i try to print the report , the printer dialogue box was appearing on server machine, i want it on client end, how to solve this problem, please any one know help me, it was urgent,

my code was like this

Code:
JasperCompileManager.compileReportToFile("c:/report/test.jrxml","c:/report/test.jasper");

JasperPrint jasperPrint = JasperFillManager.fillReport("c:/report/test.jasper"),parameters,con);


List l=jasperPrint.getPages();                    
if(l.size() != 0){
  jasperPrint.setOrientation(JasperReport.ORIENTATION_PORTRAIT);
  jasperPrint.setPageHeight(877);
  jasperPrint.setPageWidth(963);
  JasperPrintManager.printPages(jasperPrint,0,l.size()-1,true);
}
thanks in advance,