private void Frm_ArrearYearsSumRep_Load(object sender, EventArgs e) { string sql = "Select * From Temp_ArrearYearsSum order by VolumeNo,Year"; DataTable dt = SQLUtl.Query(sql).Tables["dataSet"]; ArrearYearsSumRep arrearYearsSumRep = new ArrearYearsSumRep(); arrearYearsSumRep.SetDataSource(dt); crystalReportViewer1.ReportSource = arrearYearsSumRep; TextObject txtMinYear = (TextObject)arrearYearsSumRep.ReportDefinition.ReportObjects["txtMinYear"]; txtMinYear.Text = minyear; TextObject txtMaxYear = (TextObject)arrearYearsSumRep.ReportDefinition.ReportObjects["txtMaxYear"]; txtMaxYear.Text = maxyear; TextObject txtPeople = (TextObject)arrearYearsSumRep.ReportDefinition.ReportObjects["txtPeople"]; txtPeople.Text = Constant.LoginUser.UserName; }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { ArrearYearsSumRep rpt = new ArrearYearsSumRep(); rpt.Site = this.Site; return rpt; }