当前位置: 首页>>代码示例>>C#>>正文


C# Report.GetReportFile方法代码示例

本文整理汇总了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;
            }
        }
开发者ID:felipeviola,项目名称:vence4edicao,代码行数:54,代码来源:RelatParcelaFinalController.cs

示例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;
     }
 }
开发者ID:felipeviola,项目名称:vence4edicao,代码行数:15,代码来源:CargaHorariaController.cs

示例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;
     }
 }
开发者ID:felipeviola,项目名称:vence4edicao,代码行数:16,代码来源:EstagioController.cs

示例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;
            }
        }
开发者ID:felipeviola,项目名称:vence4edicao,代码行数:20,代码来源:RelatAcompMensalController.cs


注:本文中的Report.GetReportFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。