private void cbYear_SelectedIndexChanged(object sender, EventArgs e) { if (listBoxControl1.SelectedItem.ToString().Equals("Issued Amount by Year")) { IssuedAmoutByYear issuedAmoutByYearReport = new IssuedAmoutByYear(CurrentContext.LoggedInUserName); issuedAmoutByYearReport.DataSource = IssueDoc.IssuedAmoutByYear(Convert.ToInt32(cbYear.SelectedItem), Convert.ToInt32(lkAccount.EditValue), Convert.ToBoolean(checbySellingPrice.Checked)); issuedAmoutByYearReport.xrMonth.Text = string.Format("{0}", cbYear.SelectedItem); printControl1.PrintingSystem = issuedAmoutByYearReport.PrintingSystem; report = issuedAmoutByYearReport; issuedAmoutByYearReport.CreateDocument(); } else if (listBoxControl1.SelectedItem.ToString().Equals("Received Amount by Year")) { ReceivedAmoutByYear receivedAmountReport = new ReceivedAmoutByYear(CurrentContext.LoggedInUserName); receivedAmountReport.DataSource = ReceiveDoc.ReceivedAmoutByYear(Convert.ToInt32(cbYear.SelectedItem), Convert.ToInt32(lkAccount.EditValue)); receivedAmountReport.xrMonth.Text = string.Format("{0}", cbYear.SelectedItem); printControl1.PrintingSystem = receivedAmountReport.PrintingSystem; report = receivedAmountReport; receivedAmountReport.CreateDocument(); } else if (lkMode.EditValue != null && lkCategories.EditValue != null && cbMonth.SelectedItem != null && cbYear.SelectedItem != null && cbToYear.SelectedItem != null && cbToMonth.SelectedItem != null && listBoxControl1.SelectedItem.ToString().Equals("Vital Report")) { LadVitalItemReport(); } else { cbMonth_SelectedIndexChanged(null, null); } }