protected void btn_EvalutionProfByItem_Click(object sender, EventArgs e) { //this.StiWebViewer1.ResetReport(); if (TED.Term == null) { RadWindowManager1.RadAlert("لطفا ترم را انتخاب بفرمایید", 0, 100, "پیام", ""); } else { if (txt_CodeOstad.Text == string.Empty) { txt_CodeOstad.Text = "0"; } if (TED.Departman == null) { TED.Departman = "0"; } if (TED.Lesson == null) { TED.Lesson = "0"; } Order = 1; dt = FRB.GetEvalutionProfDividedODR(TED.Term, int.Parse(txt_CodeOstad.Text), int.Parse(TED.Departman), int.Parse(TED.Lesson), Order); if (dt.Rows.Count == 0) { RadWindowManager1.RadAlert("رکوردی وجود ندارد", 0, 100, "پیام", ""); } else { this.StiWebViewer1.ResetReport(); StiReport rpt = new StiReport(); rpt.Load(Server.MapPath("../Report/ReportEvalutionProfDividedODR.mrt")); rpt.Dictionary.Databases.Clear(); rpt.Dictionary.Databases.Add(new StiSqlDatabase("Connection1", CB.ReportConnection.ToString())); rpt.ReportCacheMode = StiReportCacheMode.On; rpt.Compile(); rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODR]"].Parameters["@Term"].ParameterValue = TED.Term; rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODR]"].Parameters["@CodeOstad"].ParameterValue = int.Parse(txt_CodeOstad.Text); rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODR]"].Parameters["@Lesson"].ParameterValue = int.Parse(TED.Lesson); rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODR]"].Parameters["@Departman"].ParameterValue = int.Parse(TED.Departman); rpt.CompiledReport.DataSources["[Faculty].[SP_EvalutionProfDividedODR]"].Parameters["@Order"].ParameterValue = Order; ((StiSqlSource)rpt.Dictionary.DataSources["[Faculty].[SP_EvalutionProfDividedODR]"]).CommandTimeout = 30000; rpt.RegData(dt); rpt.Dictionary.Synchronize(); //rpt.Show(); StiWebViewer1.Report = rpt; StiWebViewer1.Visible = true; //rpt.Print(true); } if (txt_CodeOstad.Text == "0" || txt_CodeOstad.Text == "") { txt_CodeOstad.Text = string.Empty; } } }