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

            rpt.Site = this.Site;
            return(rpt);
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptRejectionInReport rpt = new crptRejectionInReport();
     rpt.Site = this.Site;
     return rpt;
 }
Exemple #3
0
        /// <summary>
        ///  Function to print  RejectionInReport in curresponding Crystal report
        /// </summary>
        /// <param name="dsRejectionInReport"></param>
        internal void RejectionInReportPrinting(DataSet dsRejectionInReport)
        {
            try
            {
                crptRejectionInReport crptRejectionInReportObj = new crptRejectionInReport();

                foreach (DataTable dtbl in dsRejectionInReport.Tables)
                {
                    if (dtbl.TableName == "Table")
                    {
                        crptRejectionInReportObj.Database.Tables["dtblCompanyDetails"].SetDataSource(dtbl);

                    }
                    else if (dtbl.TableName == "Table1")
                    {
                        dtbl.Columns.Add("slNo");
                        int inSlNo = 1;
                        foreach (DataRow drdtbl in dtbl.Rows)
                        {
                            drdtbl["slNo"] = inSlNo++;
                        }
                        crptRejectionInReportObj.Database.Tables["dtblRejectionInMaster"].SetDataSource(dtbl);
                    }

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

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