public FileResult GerarRelatorio(string nomeRelatorio, string numeroAES, int itemAES, string mesRef = "", string PFinal = "N", int codigoMantida = 0) { try { Report relatorio = new Report(); byte[] file = null; var parametros = new List<ReportParameter>(); switch (nomeRelatorio) { case "RelatorioFisicoFinaceiroParcelaFinal": { parametros.Add(new ReportParameter { Name = "Numero_AES", Value = numeroAES }); parametros.Add(new ReportParameter { Name = "Item_AES", Value = itemAES.ToString() }); parametros.Add(new ReportParameter { Name = "Cod_Mantida", Value = codigoMantida.ToString() }); file = relatorio.GetReportFile(nomeRelatorio, "/Vence/Financeiro", ReportFormat.PDF, parametros); break; } case "RelatorioFisicoFinaceiroParcelaMensal": { parametros.Add(new ReportParameter { Name = "Numero_AES", Value = numeroAES }); parametros.Add(new ReportParameter { Name = "Item_AES", Value = itemAES.ToString() }); parametros.Add(new ReportParameter { Name = "mes_ref", Value = mesRef }); file = relatorio.GetReportFile(nomeRelatorio, "/Vence/Financeiro", ReportFormat.PDF, parametros); break; } case "SumarioFisicoFinanceirodaParcela": { parametros.Add(new ReportParameter { Name = "Numero_AES", Value = numeroAES }); parametros.Add(new ReportParameter { Name = "Item_AES", Value = itemAES.ToString() }); parametros.Add(new ReportParameter { Name = "Cod_Mantida", Value = codigoMantida.ToString() }); parametros.Add(new ReportParameter { Name = "mes_ref", Value = mesRef }); file = relatorio.GetReportFile(nomeRelatorio, "/Vence/Financeiro", ReportFormat.PDF, parametros); break; } case "RelatorioAcompFreqDiariaAlunos": { parametros.Add(new ReportParameter { Name = "Numero_AES", Value = numeroAES }); parametros.Add(new ReportParameter { Name = "Item_AES", Value = itemAES.ToString() }); parametros.Add(new ReportParameter { Name = "CodMantida", Value = codigoMantida.ToString() }); parametros.Add(new ReportParameter { Name = "mes_ref", Value = mesRef }); parametros.Add(new ReportParameter { Name = "PFinal", Value = PFinal }); file = relatorio.GetReportFile(nomeRelatorio, "/Vence/Frequencia", ReportFormat.PDF, parametros); break; } } return File(file, ReportFormat.PDF.GetEnumDescription(), nomeRelatorio + ".pdf"); } catch (Exception e) { return null; } }
public FileResult GerarRelatorio(string chave) { try { Report relatorio = new Report(); var parametros = new List<ReportParameter>(); parametros.Add(new ReportParameter { Name = "Chave", Value = chave.ToString() }); byte[] file = relatorio.GetReportFile("CargaHorariaVence", "/Vence", ReportFormat.XLS, parametros); return File(file, ReportFormat.XLS.GetEnumDescription(), "CargaHorariaVence.xls"); } catch (Exception e) { return null; } }
public FileResult GerarRelatorio(string numeroAES, int itemAES) { try { Report relatorio = new Report(); var parametros = new List<ReportParameter>(); parametros.Add(new ReportParameter { Name = "Numero_AES", Value = numeroAES }); parametros.Add(new ReportParameter { Name = "Item_AES", Value = itemAES.ToString() }); byte[] file = relatorio.GetReportFile("RelatorioAcompanhamentoEstagio", "/Vence/Estagio", ReportFormat.PDF, parametros); return File(file, ReportFormat.PDF.GetEnumDescription(), "RelatorioAcompanhamentoEstagio.pdf"); } catch (Exception e) { return null; } }
public FileResult GerarRelatorio(string numeroAES, int itemAES, string mesReferencia) { try { var parametros = new List<ReportParameter>(); parametros.Add(new ReportParameter { Name = "Numero_AES", Value = numeroAES }); parametros.Add(new ReportParameter { Name = "Item_AES", Value = itemAES.ToString() }); parametros.Add(new ReportParameter { Name = "mes_ref", Value = mesReferencia }); parametros.Add(new ReportParameter { Name = "PFinal", Value = "N" }); parametros.Add(new ReportParameter { Name = "CodMantida", Value = "0" }); Report relatorio = new Report(); byte[] file = relatorio.GetReportFile("RelatAcompMensal", "/Vence/Frequencia", ReportFormat.PDF, parametros); return File(file, ReportFormat.PDF.GetEnumDescription(), "RelatAcompMensal.pdf"); } catch (Exception e) { return null; } }