Beispiel #1
0
        private void printSlip()
        {
            try
            {
                suplierPaymentDataset mydataset = new suplierPaymentDataset();

                DataRow row = mydataset.Tables["supBalPay"].NewRow();
                row[0] = id;
                row[1] = name;
                row[2] = pDate;
                row[3] = due;
                row[4] = payment;
                row[5] = balance;
                row[6] = description;

                mydataset.Tables["supBalPay"].Rows.Add(row);
                supBalPaymentSlip myreport = new supBalPaymentSlip();
                myreport.SetDataSource(mydataset);

                supBalPaymentRViews sbpmrv = new supBalPaymentRViews();
                sbpmrv.crystalReportViewer1.ReportSource = myreport;
                sbpmrv.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "error!!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void printSlip()
        {
            try
            {

                suplierPaymentDataset mydataset = new suplierPaymentDataset();

                DataRow row = mydataset.Tables["supBalPay"].NewRow();
                row[0] = id;
                row[1] = name;
                row[2] = pDate;
                row[3] = due;
                row[4] = payment;
                row[5] = balance;
                row[6] = description;

                mydataset.Tables["supBalPay"].Rows.Add(row);
                supBalPaymentSlip myreport = new supBalPaymentSlip();
                myreport.SetDataSource(mydataset);

                supBalPaymentRViews sbpmrv = new supBalPaymentRViews();
                sbpmrv.crystalReportViewer1.ReportSource = myreport;
                sbpmrv.Show();

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "error!!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }