Beispiel #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        MetodosPontoFrequencia.Frequencia Freq = new MetodosPontoFrequencia.Frequencia();

        MetodosPontoFrequencia.DataSetPontoFrequencia ds = new DataSetPontoFrequencia();

        MetodosPontoFrequencia.PreencheTabela pt = new MetodosPontoFrequencia.PreencheTabela();

        Freq.HorasDias(7, 688, 2014, ds, 4, 7);

        Stimulsoft.Report.StiReport Report = new Stimulsoft.Report.StiReport();

        //Stimulsoft.Report.Web.StiWebDesigner st1 = new Stimulsoft.Report.Web.StiWebDesigner();

        Report.Load(Server.MapPath(@"~/Relatorio/RPT/ReportTesteFeito.mrt"));

        Report.RegData("DatasetPontoFrequencia", ds);

        Report.Render();

        MemoryStream memStream = new MemoryStream();

        Stimulsoft.Report.Export.StiPdfExportService Export = new Stimulsoft.Report.Export.StiPdfExportService();

        Export.ExportPdf(Report, memStream, Stimulsoft.Report.StiPagesRange.All, 100, 100, false, false, true, true, "", "", Stimulsoft.Report.Export.StiUserAccessPrivileges.All, Stimulsoft.Report.Export.StiPdfEncryptionKeyLength.Bit128, false);

        //HttpContext.Current.Response.ClearContent();
        //HttpContext.Current.Response.ClearHeaders();
        HttpContext.Current.Response.ContentType = "application/pdf";
        HttpContext.Current.Response.BinaryWrite(memStream.ToArray());
        //HttpContext.Current.Response.Flush();
        //HttpContext.Current.Response.Close();
    }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        MetodosPontoFrequencia.Frequencia Freq = new MetodosPontoFrequencia.Frequencia();

        DataSetPontoFrequencia ds = new DataSetPontoFrequencia();

        MetodosPontoFrequencia.PreencheTabela pt = new MetodosPontoFrequencia.PreencheTabela();

        Freq.HorasDias(7, 688, 2014, ds, 4, 7);

        Stimulsoft.Report.StiReport Report = new Stimulsoft.Report.StiReport();

        //Stimulsoft.Report.Web.StiWebDesigner st1 = new Stimulsoft.Report.Web.StiWebDesigner();

        Report.Load(Server.MapPath(@"~/Relatorio/RPT/rptFolhaFrequencia.mrt"));

        Report.RegData("DatasetPontoFrequencia", ds);

        Report.Render();

        System.IO.MemoryStream memStream = new System.IO.MemoryStream();

        HttpContext.Current.Response.ClearContent();
        HttpContext.Current.Response.ClearHeaders();
        HttpContext.Current.Response.ContentType = "application/pdf";

        HttpContext.Current.Response.AddHeader("Teste.pdf", "");

        Stimulsoft.Report.Export.StiPdfExportService Export = new Stimulsoft.Report.Export.StiPdfExportService();

        Export.ExportPdf(Report, memStream, Stimulsoft.Report.StiPagesRange.All, 100, 100, false, false, true, true, "", "", Stimulsoft.Report.Export.StiUserAccessPrivileges.All, Stimulsoft.Report.Export.StiPdfEncryptionKeyLength.Bit40, false);

        Response.ContentType = "application/pdf";

        Response.AddHeader("content-disposition", "inline; filename=Teste.pdf");


        Response.BinaryWrite(memStream.ToArray());

        //Stimulsoft.Report.Web.StiReportResponse.ResponseAs(this,

        //st1.Design(Report);
    }
Beispiel #3
0
    protected void SetandoRel()
    {
        //Report da stimulsoft

        Stimulsoft.Report.StiReport Report = new Stimulsoft.Report.StiReport();

        //Stimulsoft.Report.Web.StiWebDesigner st1 = new Stimulsoft.Report.Web.StiWebDesigner();

        if (Convert.ToString(Request.QueryString["Rel"]) == "frmZuxa")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/EspelhoPonto.mrt"));
            Report.Compile();
            Report["DiasMes"]        = TotalDiasMes.ToString();
            Report["DiasCumpridos"]  = TotalDiasCumprido.ToString();
            Report["TotalHorasMes"]  = TotalHoraMes.ToString();
            Report["HorasCumpridas"] = HorasCumpridas.ToString();
        }

        Report.RegData("DatasetPontoFrequencia", ds);

        Report.Render();

        System.IO.MemoryStream memStream = new System.IO.MemoryStream();

        HttpContext.Current.Response.ClearContent();
        HttpContext.Current.Response.ClearHeaders();
        HttpContext.Current.Response.ContentType = "application/pdf";

        HttpContext.Current.Response.AddHeader("Pontoweb.pdf", "");

        Stimulsoft.Report.Export.StiPdfExportService Export = new Stimulsoft.Report.Export.StiPdfExportService();

        Export.ExportPdf(Report, memStream, Stimulsoft.Report.StiPagesRange.All, 100, 100, false, false, true, true,
                         "", "", Stimulsoft.Report.Export.StiUserAccessPrivileges.All, Stimulsoft.Report.Export.StiPdfEncryptionKeyLength.Bit40, false);

        Response.ContentType = "application/pdf";

        Response.AddHeader("content-disposition", "inline; filename=Pontoweb.pdf");

        Response.BinaryWrite(memStream.ToArray());
    }
Beispiel #4
0
    protected void SetandoRel()
    {
        //Report da stimulsoft

        Stimulsoft.Report.StiReport Report = new Stimulsoft.Report.StiReport();

        //Stimulsoft.Report.Web.StiWebDesigner st1 = new Stimulsoft.Report.Web.StiWebDesigner();

        if (Convert.ToString(Request.QueryString["Rel"]) == "frmZurel")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/folhafrequencia.mrt"));
            Report.Compile();
            Report["DiasMes"]         = TotalDiasMes.ToString();
            Report["DiasCumpridos"]   = TotalDiasCumprido.ToString();
            Report["TotalHorasMes"]   = TotalHoraMes.ToString();
            Report["HorasCumpridas"]  = HorasCumpridas;
            Report["HorasRealizadas"] = HorasRealizadas;
        }
        else if (Convert.ToString(Request.QueryString["Rel"]) == "frmZuxa")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/EspelhoPonto.mrt"));
            Report.Compile();
            Report["DiasMes"]        = TotalDiasMes.ToString();
            Report["DiasCumpridos"]  = TotalDiasCumprido.ToString();
            Report["TotalHorasMes"]  = TotalHoraMes.ToString();
            Report["HorasCumpridas"] = HorasCumpridas.ToString();
        }
        else if (Convert.ToString(Request.QueryString["Rel"]) == "frmsitu")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/situacaousuario.mrt"));
        }
        else if (Convert.ToString(Request.QueryString["Rel"]) == "frmbco")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/totalhorasdiarias.mrt"));
            Report.Compile();
            //Report["Teste"] = 932;
        }
        else if (Convert.ToString(Request.QueryString["Rel"]) == "frmbcoHoraMes")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/bancoHoraMes.mrt"));
        }
        else if (Convert.ToString(Request.QueryString["Rel"]) == "frmRelacDia")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/relacaopontoDia.mrt"));
            Report.Compile();
            Report["DTInicio"] = INICIO;
            Report["DTFim"]    = FIM;
        }
        else if (Convert.ToString(Request.QueryString["Rel"]) == "frmLocalRegistro")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/LocalRegistro.mrt"));
            Report.Compile();
            Report["DTInicio"] = INICIO;
            Report["DTFim"]    = FIM;
        }
        else if (Convert.ToString(Request.QueryString["Rel"]) == "frmMotivoFalta")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/RelacaoMotivoFalta.mrt"));
            Report.Compile();
            Report["DTInicio"] = INICIO;
            Report["DTFim"]    = FIM;
        }
        else if (Convert.ToString(Request.QueryString["Rel"]) == "frmfca")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/FichaCadastral.mrt"));
            Report.Compile();
        }
        else if (Convert.ToString(Request.QueryString["Rel"]) == "frmfi")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/FichaCadastral.mrt"));
            Report.Compile();
        }
        else if (Convert.ToString(Request.QueryString["Rel"]) == "frmdesc")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/RelRelacaoRegistroPeriodo.mrt"));
            Report.Compile();
            Report["DTInicio"] = INICIO;
            Report["DTFim"]    = FIM;
        }
        else if (Convert.ToString(Request.QueryString["Rel"]) == "frmfaltaInjust")
        {
            if (RelUtilizado == 0)
            {
                Report.Load(Server.MapPath(@"~/Relatorio/STF/RelDataInjustificada.mrt"));
            }
            else
            {
                Report.Load(Server.MapPath(@"~/Relatorio/STF/RelRegistroAusente.mrt"));
            }
            //o Outro Aqui
            Report.Compile();
            Report["DTInicio"] = INICIO;
            Report["DTFim"]    = FIM;
        }
        else if (Convert.ToString(Request.QueryString["Rel"]) == "frmAuditRel")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/RelatorioAuditoriaJustificativa.mrt"));
            Report.Compile();
            Report["DTInicio"] = INICIO;
            Report["DTFim"]    = FIM;
        }
        else if (Convert.ToString(Request.QueryString["Rel"]) == "frmLogMaqRel")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/AuditoriaGeralDasConexoes.mrt"));
            Report.Compile();
        }
        else if (Convert.ToString(Request.QueryString["Rel"]) == "frmInfoMaqRel")
        {
            Report.Load(Server.MapPath(@"~/Relatorio/STF/InformacoesMaquinasColetorLocal.mrt"));
            Report.Compile();
        }

        Report.RegData("DatasetPontoFrequencia", ds);

        Report.Render();

        System.IO.MemoryStream memStream = new System.IO.MemoryStream();

        HttpContext.Current.Response.ClearContent();
        HttpContext.Current.Response.ClearHeaders();
        HttpContext.Current.Response.ContentType = "application/pdf";

        HttpContext.Current.Response.AddHeader("Pontoweb.pdf", "");

        Stimulsoft.Report.Export.StiPdfExportService Export = new Stimulsoft.Report.Export.StiPdfExportService();

        Export.ExportPdf(Report, memStream, Stimulsoft.Report.StiPagesRange.All, 100, 100, false, false, true, true,
                         "", "", Stimulsoft.Report.Export.StiUserAccessPrivileges.All, Stimulsoft.Report.Export.StiPdfEncryptionKeyLength.Bit40, false);

        Response.ContentType = "application/pdf";

        Response.AddHeader("content-disposition", "inline; filename=Pontoweb.pdf");

        Response.BinaryWrite(memStream.ToArray());
    }