public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { itemsGridReport rpt = new itemsGridReport(); rpt.Site = this.Site; return(rpt); }
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(); }
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"); } }