Exemplo n.º 1
0
        public void ExportarRelatorio1(string NomeRelatorio, enTipoRelatorio TipoRel)
        {
            ServerReport sReport = new ServerReport();

            sReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["Relatorios"]);
            sReport.ReportPath      = NomeRelatorio;
            Byte[] mybytes1 = sReport.Render(TipoRel.ToString());
        }
Exemplo n.º 2
0
        public string ExportarRelatorio(string NomeRelatorio, enTipoRelatorio TipoRel)
        {
            ServerReport sReport = new ServerReport();

            sReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["Relatorios"]);
            sReport.ReportPath      = NomeRelatorio;

            sReport.ReportServerCredentials = new MyCredentials("saRelatorio", "rona3007");
            //sReport.ReportServerCredentials = new MyCredentials("", "");

            Byte[] mybytes1 = sReport.Render(TipoRel.ToString());

            return(SalvarRelatorio(mybytes1, TipoRel));
        }
Exemplo n.º 3
0
        public void ExportarRelatorio(System.Web.UI.Page Pagina, string NomeRelatorio, enTipoRelatorio TipoRel, ReportParameter[] parameters)
        {
            ServerReport sReport = new ServerReport();

            sReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["Relatorios"]);
            sReport.ReportPath      = NomeRelatorio;

            sReport.ReportServerCredentials = new MyCredentials("", "");

            sReport.SetParameters(parameters);
            Byte[] mybytes1 = sReport.Render(TipoRel.ToString());

            string nomeRel = SalvarRelatorio(mybytes1, TipoRel);

            nomeRel = nomeRel.Replace("\\", "/");

            Pagina.Response.Write("<SCRIPT language=javascript>window.open('" + nomeRel + "', '_blank', 'width=1200, height=900, menubar=no, resizable=yes, scrollbars=yes, top=35, left=105');</SCRIPT>");
        }