Q: my jasper report always overwrite on the previous report i want to save my jasper report with different name every time 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);

}

how to put file name different on every save?

A: You need to pass the file name as a parameter and use this to write the pdf 
JasperExportManager.exportReportToPdfFile(sourceFileName, destinationFileName)
If you are using jasper-reports in a web application and if you need to send the response to the browser then you can write the report to the OutputStream and then set the file name in the response header.
byte[] byteArray = JasperExportManager.exportReportToPdf(jasperPrintObject);
httpServletResponse.setHeader("Content-disposition","attachment; filename="+fileName);
httpServletResponse.getOutputStream().write(byteArray);

