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

            rpt.Site = this.Site;
            return(rpt);
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptCreditNoteReport rpt = new crptCreditNoteReport();
     rpt.Site = this.Site;
     return rpt;
 }
Esempio n. 3
0
        /// <summary>
        ///  Function to print  CreditNoteReport in curresponding Crystal report
        /// </summary>
        /// <param name="dsCreditNoteReport"></param>
        public void CreditNoteReportPrinting(DataSet dsCreditNoteReport)
        {
            try
            {
                crptCreditNoteReport crptCreditNoteReport = new crptCreditNoteReport();


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

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