Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            PaymentChequeTableAdapters.paymentsTableAdapter adapter = new PaymentChequeTableAdapters.paymentsTableAdapter();
            PaymentCheque.paymentsDataTable table = new PaymentCheque.paymentsDataTable();


            adapter.FillByvender(table, vender.Text);
            ReportDataSource MyNewDatSource = new ReportDataSource("PaymentCheque", (DataTable)table);

            this.reportViewer1.LocalReport.DataSources.Clear();
            this.reportViewer1.LocalReport.DataSources.Add(MyNewDatSource);
            this.reportViewer1.LocalReport.Refresh();
            this.reportViewer1.RefreshReport();
        }
Пример #2
0
        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            PaymentChequeTableAdapters.paymentsTableAdapter adapter = new PaymentChequeTableAdapters.paymentsTableAdapter();
            PaymentCheque.paymentsDataTable table = new PaymentCheque.paymentsDataTable();


            adapter.Fill(table);
            ReportDataSource MyNewDatSource = new ReportDataSource("PaymentCheque", (DataTable)table);

            this.reportViewer1.LocalReport.DataSources.Clear();
            this.reportViewer1.LocalReport.DataSources.Add(MyNewDatSource);
            this.reportViewer1.LocalReport.Refresh();
            this.reportViewer1.RefreshReport();
        }