示例#1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            RTrabPerfil rpt = new RTrabPerfil();

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
        //-----------------------------------------------------------------------------------------------
        //                                      C O M B O S
        //-----------------------------------------------------------------------------------------------
        //-----------------------------------------------------------------------------------------------
        //                                      G R I D // S
        //-----------------------------------------------------------------------------------------------
        //-----------------------------------------------------------------------------------------------
        //                                     B O T O N E S
        //-----------------------------------------------------------------------------------------------
        private void btnImprimir_Click(object sender, EventArgs e)
        {
            if (cboEmpleados.SelectedIndex == 0 && cboCia.SelectedIndex == 0 && cboUbicacion.SelectedIndex == 0)
            {
                MessageBox.Show("Debe Seleccionar Trabajador, Compañia o Ubicación");
                cboEmpleados.Focus();
            }
            else
            {
                if (cboEmpleados.SelectedIndex == 0)
                {
                    iIDT = 0;
                }
                else
                {
                    iIDT = Int32.Parse(cboEmpleados.SelectedValue.ToString());
                }
                iIDC = Int32.Parse(cboCia.SelectedValue.ToString());
                IIDU = Int32.Parse(cboUbicacion.SelectedValue.ToString());
                IACT = Int32.Parse(cboStatus.SelectedIndex.ToString());
                ISTC = Int32.Parse(CbCheca.SelectedIndex.ToString());



                DataTable dtRpt = CTrabPerf.PerfilTrab_S(4, iIDT, iIDC, IIDU, IACT, ISTC);

                ViewerReporte  form      = new ViewerReporte();
                RTrabPerfil    dtsRep    = new RTrabPerfil();
                ReportDocument ReportDoc = Utilerias.ObtenerObjetoReporte(dtRpt, this.CompanyName, dtsRep.ResourceName);

                form.RptDoc = ReportDoc;
                form.Show();
            }

            ////Prueba Reporte Incidencias pasadas a Nomina
            //Incidencia objIncidencia = new Incidencia();
            //DataTable dtIncidencia = objIncidencia.ReporteIncidenciasPasadasNomina("%", DateTime.Parse("2017-02-05"), DateTime.Parse("2017-04-01"), "%", "%", "%");

            //ViewerReporte form = new ViewerReporte();
            //IncidenciasPasadasNomina rptIncidencia = new IncidenciasPasadasNomina();
            //ReportDocument ReportDoc = Utilerias.ObtenerObjetoReporte(dtIncidencia, "RecursosHumanos", rptIncidencia.ResourceName);

            //ReportDoc.SetParameterValue("FechaActual", DateTime.Now.ToString("dd/MM/yyyy"));
            //form.RptDoc = ReportDoc;
            //form.Show();
        }