Exemplo n.º 1
0
        private void btnListarIntegrantes_Click(object sender, EventArgs e)
        {
            int indice = dgvDatos.Rows.GetFirstRow(DataGridViewElementStates.Selected);
            int codigo;
            if (indice != -1)
            {
                oPersona = new clsPersona();
                crystal_Integrantes = new crIntengrantes();
                codigo = Convert.ToInt32(dgvDatos["codigo_grupo", indice].Value.ToString());

                //aca traigo los datos en un datatable
                dtIntegrantes = oPersona.listarIntegrantes(codigo);
                if (dtIntegrantes.Rows.Count != 0)
                {
                    crystal_Integrantes.SetDataSource(dtIntegrantes);
                    crystal_Integrantes.SetParameterValue("nombre_grupo", tbNombreGrupo.Text);
                    frmVisorIntegrantes formIntegrantes = new frmVisorIntegrantes();
                    formIntegrantes.crvIntegrantes.ReportSource = crystal_Integrantes;
                    formIntegrantes.ShowDialog();
                }
                else
                {
                    MessageBox.Show("Este Grupo no tiene integrantes");
                }
            }
        }
Exemplo n.º 2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     crIntengrantes rpt = new crIntengrantes();
     rpt.Site = this.Site;
     return rpt;
 }