private void GenerarReporte()
    {
        tools _tools = new tools();

        String ID_OCUPACION = null;
        if (CheckBox_CargoAspira.Checked == true)
        {
            ID_OCUPACION = DropDownList_CargoAspira.SelectedValue;
        }

        String NIV_EDUCACION = null;
        if (CheckBox_NivelEscolaridad.Checked == true)
        {
            NIV_EDUCACION = DropDownList_NivelEsolaridad.SelectedValue;
        }

        String PROFESION = null;
        if (CheckBox_Profesión.Checked == true)
        {
            PROFESION = DropDownList_Profesion.SelectedValue;
        }

        String AREA_INTERES_LABORAL = null;
        if (CheckBox_AreaInteres.Checked == true)
        {
            AREA_INTERES_LABORAL = DropDownList_AreaInteres.SelectedValue;
        }

        String EXPERIENCIA = null;
        if (CheckBox_Experiencia.Checked == true)
        {
            EXPERIENCIA = DropDownList_Experiencia.SelectedValue;
        }

        String EDAD_DESDE = null;
        String EDAD_HASTA = null;
        if (CheckBox_Edad.Checked == true)
        {
            EDAD_DESDE = TextBox_EdadDesde.Text;
            EDAD_HASTA = TextBox_EdadHasta.Text;
        }

        String ID_CIUDAD = null;
        if (CheckBox_Ciudad.Checked == true)
        {
            ID_CIUDAD = DropDownList_Ciudad.SelectedValue;
        }

        String NOMBRES = null;
        String APELLIDOS = null;
        if (CheckBox_NombresApellidos.Checked == true)
        {
            NOMBRES = TextBox_Nombres.Text;
            APELLIDOS = TextBox_Apellidos.Text;
        }

        String BARRIO = null;
        if (CheckBox_Barrio.Checked == true)
        {
            BARRIO = TextBox_Barrio.Text;
        }

        String ASPIRACION_DESDE = null;
        String ASPIRACION_HASTA = null;
        if (CheckBox_AspiracionSalarial.Checked == true)
        {
            ASPIRACION_DESDE = TextBox_AspiracionSalarialDesde.Text.Replace(".","").Replace(",",".");
            ASPIRACION_HASTA = TextBox_AspiracionSalarialHasta.Text.Replace(".", "").Replace(",", ".");
        }

        String FECHA_ACTUALIZACION_DESDE = null;
        String FECHA_ACTUALIZACION_HASTA = null;
        if (CheckBox_FechaActualizacion.Checked == true)
        {
            FECHA_ACTUALIZACION_DESDE = _tools.obtenerStringConFormatoFechaSQLServer(Convert.ToDateTime(TextBox_FechaActualizacionDesde.Text));
            FECHA_ACTUALIZACION_HASTA = _tools.obtenerStringConFormatoFechaSQLServer(Convert.ToDateTime(TextBox_FechaActualizacionHasta.Text));
        }

        String PALABRA_CLAVE = null;
        if (CheckBox_PalabraClave.Checked == true)
        {
            PALABRA_CLAVE = TextBox_PalabraClave.Text.Trim();
        }

        String TIPO_REPORTE = RadioButtonList_TipoReporte.SelectedValue;

        BaseDatos _base = new BaseDatos(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());

        DataTable tablaReporte = _base.ObtenerReporteBaseDatos(ID_OCUPACION, NIV_EDUCACION, PROFESION, AREA_INTERES_LABORAL, EXPERIENCIA, EDAD_DESDE, EDAD_HASTA, ID_CIUDAD, NOMBRES, APELLIDOS, BARRIO, ASPIRACION_DESDE, ASPIRACION_HASTA, FECHA_ACTUALIZACION_DESDE, FECHA_ACTUALIZACION_HASTA, PALABRA_CLAVE, TIPO_REPORTE);

        if (tablaReporte.Rows.Count <= 0)
        {
            if (_base.MensajeError != null)
            {
                Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, _base.MensajeError, Proceso.Error);
            }
            else
            {
                Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, "No se encontraron registros que cumplieran las condicioes de filtrado.", Proceso.Advertencia);
            }

            Panel_GrillaReporte.Visible = false;

            GridView_Reporte.DataSource = null;
            GridView_Reporte.DataBind();

            Button_ExportarExcel.Visible = false;
            Button_ExportarExcel_1.Visible = false;
        }
        else
        {
            Panel_GrillaReporte.Visible = true;

            Cargar_GrillaReporte_DesdeTabla(tablaReporte);

            if (TIPO_REPORTE == "NO LABORAN")
            {
                GridView_Reporte.Columns[0].Visible = true;
            }
            else
            {
                GridView_Reporte.Columns[0].Visible = false;
            }

            Button_ExportarExcel.Visible = true;
            Button_ExportarExcel_1.Visible = true;
        }
    }
    private void ExportarReporte()
    {
        tools _tools = new tools();

        String ID_OCUPACION = null;
        if (CheckBox_CargoAspira.Checked == true)
        {
            ID_OCUPACION = DropDownList_CargoAspira.SelectedValue;
        }

        String NIV_EDUCACION = null;
        if (CheckBox_NivelEscolaridad.Checked == true)
        {
            NIV_EDUCACION = DropDownList_NivelEsolaridad.SelectedValue;
        }

        String PROFESION = null;
        if (CheckBox_Profesión.Checked == true)
        {
            PROFESION = DropDownList_Profesion.SelectedValue;
        }

        String AREA_INTERES_LABORAL = null;
        if (CheckBox_AreaInteres.Checked == true)
        {
            AREA_INTERES_LABORAL = DropDownList_AreaInteres.SelectedValue;
        }

        String EXPERIENCIA = null;
        if (CheckBox_Experiencia.Checked == true)
        {
            EXPERIENCIA = DropDownList_Experiencia.SelectedValue;
        }

        String EDAD_DESDE = null;
        String EDAD_HASTA = null;
        if (CheckBox_Edad.Checked == true)
        {
            EDAD_DESDE = TextBox_EdadDesde.Text;
            EDAD_HASTA = TextBox_EdadHasta.Text;
        }

        String ID_CIUDAD = null;
        if (CheckBox_Ciudad.Checked == true)
        {
            ID_CIUDAD = DropDownList_Ciudad.SelectedValue;
        }

        String NOMBRES = null;
        String APELLIDOS = null;
        if (CheckBox_NombresApellidos.Checked == true)
        {
            NOMBRES = TextBox_Nombres.Text;
            APELLIDOS = TextBox_Apellidos.Text;
        }

        String BARRIO = null;
        if (CheckBox_Barrio.Checked == true)
        {
            BARRIO = TextBox_Barrio.Text;
        }

        String ASPIRACION_DESDE = null;
        String ASPIRACION_HASTA = null;
        if (CheckBox_AspiracionSalarial.Checked == true)
        {
            ASPIRACION_DESDE = TextBox_AspiracionSalarialDesde.Text.Replace(".", "").Replace(",", ".");
            ASPIRACION_HASTA = TextBox_AspiracionSalarialHasta.Text.Replace(".", "").Replace(",", ".");
        }

        String FECHA_ACTUALIZACION_DESDE = null;
        String FECHA_ACTUALIZACION_HASTA = null;
        if (CheckBox_FechaActualizacion.Checked == true)
        {
            FECHA_ACTUALIZACION_DESDE = _tools.obtenerStringConFormatoFechaSQLServer(Convert.ToDateTime(TextBox_FechaActualizacionDesde.Text));
            FECHA_ACTUALIZACION_HASTA = _tools.obtenerStringConFormatoFechaSQLServer(Convert.ToDateTime(TextBox_FechaActualizacionHasta.Text));
        }

        String PALABRA_CLAVE = null;
        if (CheckBox_PalabraClave.Checked == true)
        {
            PALABRA_CLAVE = TextBox_PalabraClave.Text.Trim();
        }

        String TIPO_REPORTE = RadioButtonList_TipoReporte.SelectedValue;

        BaseDatos _base = new BaseDatos(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());

        DataTable tablaReporte = _base.ObtenerReporteBaseDatos(ID_OCUPACION, NIV_EDUCACION, PROFESION, AREA_INTERES_LABORAL, EXPERIENCIA, EDAD_DESDE, EDAD_HASTA, ID_CIUDAD, NOMBRES, APELLIDOS, BARRIO, ASPIRACION_DESDE, ASPIRACION_HASTA, FECHA_ACTUALIZACION_DESDE, FECHA_ACTUALIZACION_HASTA, PALABRA_CLAVE, TIPO_REPORTE);

        ExportarDataTableToExcel1(tablaReporte);
    }