Beispiel #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            lowStockReport rpt = new lowStockReport();

            rpt.Site = this.Site;
            return(rpt);
        }
        private void report_Click(object sender, EventArgs e)
        {
            printSaleForm printForm = new printSaleForm();
            stockDataSet  dataSet   = new stockDataSet();

            dataSet.EnforceConstraints = false;

            lowStockReport report = new lowStockReport();

            try
            {
                adapter8.Fill(dataSet.medicine);

                report.SetDataSource(dataSet);

                printForm.crystalReportViewer1.ReportSource = report;
                printForm.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }