private void BtnListSupp_Click(object sender, EventArgs e) { SupplierRepository repository = new SupplierRepository(); List <Supplier> suppliers = repository.GetSuppliers().ToList(); if (suppliers.Count == 0) { MessageBox.Show("No Records To Display.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } ReportDocument report = new SupplierList(); report.SetDataSource(suppliers); report.SetParameterValue("@Company", Properties.Settings.Default.COMPANYNAME.ToUpper()); report.SetParameterValue("@Branch", Properties.Settings.Default.BRANCHNAME.ToUpper()); report.SetParameterValue("@Username", Properties.Settings.Default.USERNAME.ToUpper()); Form form = new frmPrint(report); form.Text = "Supplier Master List"; form.Show(); }