| 发表于:2007-09-22 15:19:053楼 得分:50 |
试下这样: //页面输出到pdf try{ byte[] bytes = jasperrunmanager.runreporttopdf(jasperreport,params,ds); response.setcontenttype( "application/pdf "); response.setcontentlength(bytes.length); servletoutputstream ouputstream = response.getoutputstream(); ouputstream.write(bytes,0,bytes.length); ouputstream.flush(); ouputstream.close(); }catch(exception ex){ 你用jasperviewer.viewreport(jasperprint);当然是用jrviewer预览! | | |
|