protected void btn_CurrentTerm_Click(object sender, EventArgs e)
 {
     //img_ExportToExcel1.Visible = false;
     //img_ExportToExcel2.Visible = false;
     if (ddl_Term.SelectedValue == null || ddl_Term.SelectedValue == "0")
     {
         RadWindowManager1.RadAlert("لطفا ترم را انتخاب بفرمایید", 0, 100, "پیام", "");
     }
     else
     {
         if (ddl_Cooperation.SelectedValue == null)
         {
             ddl_Cooperation.SelectedValue = "0";
         }
         if (ddl_EducationGroup.SelectedValue == null)
         {
             ddl_EducationGroup.SelectedValue = "0";
         }
         dt = FRB.GetListProfinCurrentTerm(ddl_Term.SelectedValue, int.Parse(ddl_EducationGroup.SelectedValue), int.Parse(ddl_Cooperation.SelectedValue));
         if (dt.Rows.Count == 0)
         {
             RadWindowManager1.RadAlert("رکوردی وجود ندارد", 0, 100, "پیام", "");
         }
         else
         {
             //img_ExportToExcel2.Visible = true;
             DataTable dtDanesh = new DataTable();
             dtDanesh = FRB.GetNameDepartmanAndGroup(int.Parse(ddl_EducationGroup.SelectedValue), int.Parse(ddl_Cooperation.SelectedValue));
             this.StiWebViewer1.ResetReport();
             StiWebViewer1.Visible = true;
             StiReport rpt = new StiReport();
             rpt.Load(Server.MapPath("../Report/ReportListProfCurrentTerm.mrt"));
             rpt.ReportCacheMode = StiReportCacheMode.On;
             rpt.Dictionary.Databases.Clear();
             rpt.Dictionary.Databases.Add(new StiSqlDatabase("Connection1", CB.ReportConnection.ToString()));
             rpt.Compile();
             rpt.CompiledReport.DataSources["[Faculty].[SP_ListProfCurrentTerm]"].Parameters["@Departman"].ParameterValue      = int.Parse(ddl_EducationGroup.SelectedValue);
             rpt.CompiledReport.DataSources["[Faculty].[SP_ListProfCurrentTerm]"].Parameters["@Term"].ParameterValue           = ddl_Term.SelectedValue;
             rpt.CompiledReport.DataSources["[Faculty].[SP_ListProfCurrentTerm]"].Parameters["@Cooperation"].ParameterValue    = int.Parse(ddl_Cooperation.SelectedValue);
             rpt.CompiledReport.DataSources["[Faculty].[SP_NameGroupAndDaneshByID]"].Parameters["@Departman"].ParameterValue   = int.Parse(ddl_EducationGroup.SelectedValue);
             rpt.CompiledReport.DataSources["[Faculty].[SP_NameGroupAndDaneshByID]"].Parameters["@Cooperation"].ParameterValue = int.Parse(ddl_Cooperation.SelectedValue);
             rpt.RegData(dt);
             rpt.RegData(dtDanesh);
             rpt.Dictionary.Synchronize();
             //rpt.Show();
             StiWebViewer1.Report  = rpt;
             StiWebViewer1.Visible = true;
             //rpt.Print(true);
         }
     }
 }