public static void generateReportInPdf(Map parameters ) throws JRException, SQLException, ClassNotFoundException
{
Connection conn = Connect.connectMySqlDB();
String jasperPath = ServletActionContext.getServletContext().getRealPath("/voucher/voucher.jasper");
String jrprintPath = ServletActionContext.getServletContext().getRealPath("/voucher/voucher.jrprint");
JasperFillManager.fillReportToFile(jasperPath, parameters, conn);
JasperExportManager.exportReportToPdfFile(jrprintPath);
}
如何在每次保存时放置不同的文件名?