List l=userservice.selectl();
JasperPrint jasperPrint;
JRDataSource jrDataSource;
//1.读取.japser文件,构建输入流
String jasperpath="C://Users/qw/JaspersoftWorkspace/one/j/Blank_A4.jasper";
InputStream in = new FileInputStream(new File(jasperpath));
try{
jrDataSource=new JRBeanCollectionDataSource(l);
// JasperReport jasperReport=JasperCompileManager.compileReport("C://Users/qw/JaspersoftWorkspace/one/j/Blank_A4.jrxml");
jasperPrint=JasperFillManager.fillReport(in,null,jrDataSource);
JasperExportManager.exportReportToPdfStream(jasperPrint,response.getOutputStream());
response.getOutputStream().flush();
response.getOutputStream().close();
}catch(Exception e){
e.printStackTrace();
}
```用的是javabean作为数据源,但是pdf报表一直都只显示一条数据