new public void Load() { this.BindingLanguage(); rptChar = new rptReportChart(); this.viewDoanhThu.HorizontalScroll.Visible = false; this.viewDoanhThu.VerticalScroll.Visible = false; this.viewDoanhThu.Document = rptChar.Document; cboChiTieu.DataSource = SQLExec.ExecuteReturnDt(@"SELECT ID = 'GIOITINH',Name = N'Giới tính' UNION ALL SELECT ID = 'BOPHAN',Name = N'Bộ phận ' UNION ALL SELECT ID = 'NGUYENQUAN',Name = N'Quê quán' "); cboChiTieu.ValueMember = "ID"; cboChiTieu.DisplayMember = "NAME"; //LoadDoanhThu(); this.Show(); }
void cboChiTieu_SelectedValueChanged(object sender, EventArgs e) { string strChitieu = cboChiTieu.SelectedValue.ToString(); rptChar = new rptReportChart(); this.viewDoanhThu.HorizontalScroll.Visible = false; this.viewDoanhThu.VerticalScroll.Visible = false; this.viewDoanhThu.Document = rptChar.Document; DataTable dtHuMan; dtHuMan = SQLExec.ExecuteReturnDt("EXEC sp_HRM_GetHumanValue '" + strChitieu + "'"); rptChar.fHeight = viewDoanhThuHeight; rptChar.fWidth = viewDoanhThuWidth; rptChar.SetLicense("RGN,RGN Warez Group,DD-APN-30-C01339,W44SSM949SWJ449HSHMF"); rptChar.Load(dtHuMan, "ID", "Value"); try { rptChar.Run(); } catch (Exception) { rptChar.Run(); } }