I have several reports made in JasperSoft that generate PDF and when generated in Java, when downloading the report on my pc, it is like "document.pdf". How do I give a different name to this report, for example "report_clients.pdf"? The reports have been assembled by jaspersoft and my application is in Java and spring to call the report I do the following:
@GetMapping("/clientes")
public ModelAndView gerarRelatoriosClientes(@AuthenticationPrincipal UsuarioSistema usuarioSistema) throws MalformedURLException, IOException {
HashMap<String, Object> parametros = new HashMap<String, Object>();
parametros.put("codigoEmpresa", usuarioSistema.getUsuario().getEmpresa().getCodigo());
parametros.put("format", "pdf");
return new ModelAndView("relatorio_clientes", parametros);
}
Can anyone help me?