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

            rpt.Site = this.Site;
            return(rpt);
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptDebitNoteReport rpt = new crptDebitNoteReport();
     rpt.Site = this.Site;
     return rpt;
 }
Пример #3
0
        /// <summary>
        ///  Function to print  DebitNoteReport in curresponding Crystal report
        /// </summary>
        /// <param name="dsDebitNoteReport"></param>
        public void DebitNoteReportPrinting(DataSet dsDebitNoteReport)
        {
            try
            {
                crptDebitNoteReport crptDebitNoteReport = new crptDebitNoteReport();

                foreach (DataTable dtbl in dsDebitNoteReport.Tables)
                {
                    if (dtbl.TableName == "Table")
                    {
                        crptDebitNoteReport.Database.Tables["dtblCompany"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table1")
                    {
                        crptDebitNoteReport.Database.Tables["dtblDebitNoteReport"].SetDataSource(dtbl);
                    }
                }
                this.crptViewer.ReportSource = crptDebitNoteReport;

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