private void button1_Click(object sender, EventArgs e)
        {
            string ParentChildGroupCode = TxtCustCode.Text;
            //string NonParentChildCode = cmbnonGroupCode.Text;
            DataTable         dt   = new DataTable();
            CrParentChildInfo rpt  = new CrParentChildInfo();
            frmReportViewer   view = new frmReportViewer();

            dt = bal.GetAllChild_ShareAndMoney_Information(ParentChildGroupCode);

            rpt.SetDataSource(dt);
            GetCommonInfo();
            ((TextObject)rpt.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName;
            ((TextObject)rpt.ReportDefinition.Sections[2].ReportObjects["txtAddress"]).Text     = _branchAddress;
            ((TextObject)rpt.ReportDefinition.Sections[2].ReportObjects["txtReportName"]).Text  = "All Account Information";
            view.crvReportViewer.ReportSource = rpt;
            view.Show();
        }
 private void ParentChildGroupReport()
 {
     try
     {
         ParentAndChildBAL bal  = new ParentAndChildBAL();
         DataTable         dt   = new DataTable();
         CrParentChildInfo rpt  = new CrParentChildInfo();
         frmReportViewer   view = new frmReportViewer();
         dt = bal.GetAllChild_ShareAndMoney_Information(_custCode);
         rpt.SetDataSource(dt);
         GetCommonInfo();
         ((TextObject)rpt.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName;
         ((TextObject)rpt.ReportDefinition.Sections[2].ReportObjects["txtAddress"]).Text     = _branchAddress;
         ((TextObject)rpt.ReportDefinition.Sections[2].ReportObjects["txtReportName"]).Text  = "All Account Information";
         view.crvReportViewer.ReportSource = rpt;
         view.Show();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }