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

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

                foreach (DataTable dtbl in dsShortExpiryReport.Tables)
                {
                    if (dtbl.TableName == "Table")
                    {
                        crptShortExpiryReportObj.Database.Tables["dtblCompany"].SetDataSource(dtbl);

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

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

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