Ejemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crptPurchaseReport rpt = new crptPurchaseReport();

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///  Function to print PurchaseReport in curresponding Crystal report
        /// </summary>
        /// <param name="dsPurchaseReport"></param>
        /// <param name="strTotal"></param>
        internal void PurchaseReportPrinting(DataSet dsPurchaseReport, string strTotal)
        {
            try
            {
                crptPurchaseReport crptPurchaseReportObj = new crptPurchaseReport();
                foreach (DataTable dtbl in dsPurchaseReport.Tables)
                {
                    if (dtbl.TableName == "Table")
                    {
                        crptPurchaseReportObj.Database.Tables["dtblCompanyReport"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table1")
                    {
                        crptPurchaseReportObj.Database.Tables["dtblPurchaseReport"].SetDataSource(dtbl);
                    }
                }
                this.crptViewer.ReportSource = crptPurchaseReportObj;

                SettingsSP spSettings = new SettingsSP();

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

        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptPurchaseReport rpt = new crptPurchaseReport();
     rpt.Site = this.Site;
     return rpt;
 }