public static void generate(String reportName, ReportsTypes type,
			Map<String, Object> params, OutputStream out, Connection conn) throws FileNotFoundException, JRException {
		ReportFileUtil rFile = ReportFileUtil.getReport(reportName);
		JasperPrint jPrint = JasperFillManager.fillReport(new FileInputStream(rFile.getRelatorio()), params, conn);
		
		switch (type) {
			case PDF:
				makePdf(jPrint, out);
				break;
			case XLS:
				makeXls(jPrint, out);
				break;
			case HTML:
				makeHtml(jPrint, out);
				break;
			case XML:
				makeXml(jPrint, out);
				break;
			default:
				break;
		}
	}