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

            rpt.Site = this.Site;
            return(rpt);
        }
Example #2
0
        /// <summary>
        ///  Function to print dayBookReport in curresponding Crystal report
        /// </summary>
        /// <param name="dsDayBookReportCondensed"></param>
        internal void dayBookReportPrintingCondensed(DataSet dsDayBookReportCondensed)
        {

            try
            {
                crptDayBookReportCondenced crptDaybookReportCondensed = new crptDayBookReportCondenced();

                foreach (DataTable dtbl in dsDayBookReportCondensed.Tables)
                {
                    if (dtbl.TableName == "Table1")
                    {
                        crptDaybookReportCondensed.Database.Tables["dtblCompany"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table2")
                    {
                        crptDaybookReportCondensed.Database.Tables["dtblDayBook"].SetDataSource(dtbl);
                    }
                }
                this.crptViewer.ReportSource = crptDaybookReportCondensed;
                SettingsSP spSettings = new SettingsSP();

                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }
                else
                {
                    crptDaybookReportCondensed.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() {
     crptDayBookReportCondenced rpt = new crptDayBookReportCondenced();
     rpt.Site = this.Site;
     return rpt;
 }