コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            itemsGridReport rpt = new itemsGridReport();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
        private void buttonPrintitemsGrid_Click(object sender, EventArgs e)
        {
            var crp  = new Reports.itemsGridReport();
            var form = new PrintForm();

            crp.SetDataSource(dataGridView_displayitems.DataSource);
            form.crystalReportViewer1.ReportSource = crp;
            form.ShowDialog();
        }
コード例 #3
0
        private void buttonPrintitemsGrid_Click(object sender, EventArgs e)
        {
            var crp  = new Reports.itemsGridReport();
            var form = new PrintForm();

            if (dataGridView_displayitems.Rows.Count > 0)
            {
                crp.SetDataSource(dataGridView_displayitems.DataSource);
                form.crystalReportViewer1.ReportSource = crp;
                form.ShowDialog();
            }
            else
            {
                MessageBox.Show("لا توجد بيانات لعرضها", "MESSAGE");
            }
        }