本文整理汇总了C#中Report.GetReportFile方法的典型用法代码示例。如果您正苦于以下问题:C# Report.GetReportFile方法的具体用法?C# Report.GetReportFile怎么用?C# Report.GetReportFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Report
的用法示例。
在下文中一共展示了Report.GetReportFile方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GerarRelatorio
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;
}
}
示例2: GerarRelatorio
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;
}
}
示例3: GerarRelatorio
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;
}
}
示例4: GerarRelatorio
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;
}
}