diff --git a/RH/RepIndiceRotacionPersonal.aspx b/RH/RepIndiceRotacionPersonal.aspx index 7427349f3..cf45a956a 100644 --- a/RH/RepIndiceRotacionPersonal.aspx +++ b/RH/RepIndiceRotacionPersonal.aspx @@ -31,6 +31,16 @@ Reporte Indice Rotación de Personal + + +
  • + +
  • +
    + + + +
    diff --git a/RH/RepIndiceRotacionPersonal.aspx.vb b/RH/RepIndiceRotacionPersonal.aspx.vb index 080918e61..10605fe33 100644 --- a/RH/RepIndiceRotacionPersonal.aspx.vb +++ b/RH/RepIndiceRotacionPersonal.aspx.vb @@ -3,10 +3,24 @@ Option Explicit On Imports Extensiones Imports System.Data +Imports Microsoft.Reporting.WebForms Partial Class Ventas_RepIndiceRotacionPersonal Inherits ClsPaginas + Private Property DTGvDatos As DataTable + Get + If ViewState("DTGvDatos") Is Nothing Then + Return New DataTable + Else + Return DirectCast(ViewState("DTGvDatos"), DataTable) + End If + End Get + Set(value As DataTable) + ViewState("DTGvDatos") = value + End Set + End Property + Private Sub Ventas_RepIndiceRotacionPersonal_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then txtInicio.Text = Date.Now.AddDays(-30).ToString("dd/MM/yyyy") @@ -84,7 +98,7 @@ Partial Class Ventas_RepIndiceRotacionPersonal If rh.GetReporteRotacionPersonal(FechaInicio, FechaFin, CveTurno, CveProyecto, CveSubproyecto, UsuarioActual.Empresa.CveEmpresa) Then dTable = rh.DtResultados End If - + DTGvDatos = dTable GVRegDatos.DataSource = dTable GVRegDatos.DataBind() @@ -138,4 +152,29 @@ Partial Class Ventas_RepIndiceRotacionPersonal End Sub + + Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) + '"Empresas/Grales/Formatos/ClienteHistorial.rdlc" + If GVRegDatos.Rows.Count > 0 Then + + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + Dim params As New List(Of ReportParameter) + params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("FechaInicial", txtInicio.Text)) + params.Add(New ReportParameter("FechaFinal", txtFin.Text)) + params.Add(New ReportParameter("FechaRealizado", Date.Now().ToString())) + params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) + + If Imagen.Exists Then + params.Add(New ReportParameter("LogoPath", logouri)) + Else + params.Add(New ReportParameter("LogoPath", "")) + End If + + ImprimirPDF("Empresas/Grales/Formatos/RepIndiceRotacionPersonal.rdlc", DTGvDatos, params, "Reporte de Historial", "PDF") + + End If + End Sub End Class