private void lkAccount_EditValueChanged(object sender, EventArgs e) { var ed = new EthiopianDate.EthiopianDate(); if (lkFiscalYear.EditValue != null && lkAccount.EditValue != null) { FiscalYear fYear = new FiscalYear(); fYear.LoadByPrimaryKey(Convert.ToInt32(lkFiscalYear.EditValue)); //TODO: this has to be re-implemented. cutOffNumberReport = new CutOffNumberReport(CurrentContext.LoggedInUserName); cutOffNumberReport.DataSource = ReceiveDoc.GetCutOffNumber(Convert.ToInt32(lkFiscalYear.EditValue), Convert.ToInt32(lkAccount.EditValue)); cutOffNumberReport.xrMonth.Text = string.Format("{0}", ed.GetMonthName()); cutOffNumberReport.xrAccount.Text = string.Format("{0}", lkAccount.Text); cutOffNumberReport.xrYear.Text = string.Format("{0}", fYear.Name); printControl1.PrintingSystem = cutOffNumberReport.PrintingSystem; cutOffNumberReport.CreateDocument(); } }