public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crptPhysicalStockReport rpt = new crptPhysicalStockReport();

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Function to print  PhysicalStockReport in curresponding Crystal report
        /// </summary>
        /// <param name="dsPhysicalStock"></param>
        internal void PhysicalStockReport(DataSet dsPhysicalStock)
        {
            try
            {
                crptPhysicalStockReport crptPhysicalStockReport = new crptPhysicalStockReport();
                foreach (DataTable dtbl in dsPhysicalStock.Tables)
                {
                    if (dtbl.TableName == "Table1")
                    {
                        crptPhysicalStockReport.Database.Tables["dtblCompanyDetails"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table2")
                    {

                        crptPhysicalStockReport.Database.Tables["dtblPhysicalStockReport"].SetDataSource(dtbl);
                    }
                }
                this.crptViewer.ReportSource = crptPhysicalStockReport;
                SettingsSP spSettings = new SettingsSP();

                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }
                else
                {
                    crptPhysicalStockReport.PrintToPrinter(1, false, 0, 0);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("CRV" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptPhysicalStockReport rpt = new crptPhysicalStockReport();
     rpt.Site = this.Site;
     return rpt;
 }