Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            Orders_Report    report = new Orders_Report();
            View_Report_Form form   = new View_Report_Form();
            int orderid             = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value);

            report.Refresh();
            report.SetParameterValue("@orderid", orderid);
            form.crystalReportViewer1.ReportSource = report;
            form.ShowDialog();
            this.Cursor = Cursors.Default;
        }
        private void printbtn_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            Orders_Report    report = new Orders_Report();
            View_Report_Form form   = new View_Report_Form();
            int orderid             = Convert.ToInt32(order.getLastOrderPrint().Rows[0][0]);

            report.Refresh();
            report.SetParameterValue("@orderid", orderid);
            form.crystalReportViewer1.ReportSource = report;
            form.ShowDialog();
            this.Cursor = Cursors.Default;
        }