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

            rpt.Site = this.Site;
            return(rpt);
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptAgeing rpt = new crptAgeing();
     rpt.Site = this.Site;
     return rpt;
 }
Example #3
0
        /// <summary>
        ///  Function to print  AgeingReport in curresponding Crystal report
        /// </summary>
        /// <param name="dsAgeing"></param>
        internal void AgeingReportPrint(DataSet dsAgeing)
        {
            try
            {

                crptAgeing crptAgeing = new crptAgeing();

                foreach (DataTable dtbl in dsAgeing.Tables)
                {
                    if (dtbl.TableName == "Table1")
                    {
                        crptAgeing.Database.Tables["dtblageing"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table2")
                    {
                        crptAgeing.Database.Tables["dtblCompanyReport1"].SetDataSource(dtbl);
                    }

                }
                this.crptViewer.ReportSource = crptAgeing;

                SettingsSP spSettings = new SettingsSP();
                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }
                else
                {
                    crptAgeing.PrintToPrinter(1, false, 0, 0);
                }
            }
            catch (Exception ex)
            {

                MessageBox.Show("BS14:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }