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

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #2
0
        /// <summary>
        /// Function to print StockJournal in curresponding Crystal report
        /// </summary>
        /// <param name="dsStockJournal"></param>
        internal void StockJournalPrinting(DataSet dsStockJournal)
        {
            try
            {

                crptStockJournal crptStockJournalObj = new crptStockJournal();
                foreach (DataTable dtbl in dsStockJournal.Tables)
                {
                    if (dtbl.TableName == "Table")
                    {
                        crptStockJournalObj.Database.Tables["dtblCompany"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table1")
                    {

                        crptStockJournalObj.Database.Tables["dtblStockJournalMaster"].SetDataSource(dtbl);

                    }
                    else if (dtbl.TableName == "Table2")
                    {
                        crptStockJournalObj.Database.Tables["dtblStockJournalDetailsConsumption"].SetDataSource(dtbl);

                    }
                    else if (dtbl.TableName == "Table3")
                    {
                        crptStockJournalObj.Database.Tables["dtblStockJournalDetailsProduction"].SetDataSource(dtbl);
                    }

                }
                this.crptViewer.ReportSource = crptStockJournalObj;
                SettingsSP spSettings = new SettingsSP();

                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }
                else
                {
                    crptStockJournalObj.PrintToPrinter(1, false, 0, 0);
                }
            }

            catch (Exception)
            {
                throw;
            }
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptStockJournal rpt = new crptStockJournal();
     rpt.Site = this.Site;
     return rpt;
 }