Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crptProductBatchReport rpt = new crptProductBatchReport();

            rpt.Site = this.Site;
            return(rpt);
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptProductBatchReport rpt = new crptProductBatchReport();
     rpt.Site = this.Site;
     return rpt;
 }
Пример #3
0
        /// <summary>
        /// Function to print EmployeeAddressBook in curresponding Crystal report
        /// </summary>
        /// <param name="dsProductBatchReport"></param>
        internal void ProductBatchReportPrinting(DataSet dsProductBatchReport)
        {
            try
            {
                crptProductBatchReport crptProductBatchReport = new crptProductBatchReport();
                foreach (DataTable dtbl in dsProductBatchReport.Tables)
                {
                    if (dtbl.TableName == "Table1")
                    {
                        crptProductBatchReport.Database.Tables["dtblCompany"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table2")
                    {
                        crptProductBatchReport.Database.Tables["dtblProductBatch"].SetDataSource(dtbl);
                    }
                }
                this.crptViewer.ReportSource = crptProductBatchReport;
                SettingsSP spSettings = new SettingsSP();

                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }
                else
                {
                    crptProductBatchReport.PrintToPrinter(1, false, 0, 0);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("CRV10 " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

        }