コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crptPurchaseOrderReport1 rpt = new crptPurchaseOrderReport1();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptPurchaseOrderReport1 rpt = new crptPurchaseOrderReport1();
     rpt.Site = this.Site;
     return rpt;
 }
コード例 #3
0
ファイル: frmReport.cs プロジェクト: jsoques/openmiracle
        /// <summary>
        /// Function to print  PurchaseOrderReport in curresponding Crystal report
        /// </summary>
        /// <param name="dsPurchaseOrderReport"></param>
        /// <param name="strTotal"></param>
        public void PurchaseOrderReportPrinting(DataSet dsPurchaseOrderReport, string strTotal)
        {
            try
            {
                DataTable dtblTotalAmount = new DataTable();
                dtblTotalAmount.Columns.Add("Grandtotal", typeof(string));
                DataRow dr = dtblTotalAmount.NewRow();
                dr[0] = strTotal;
                dtblTotalAmount.Rows.InsertAt(dr, 0);
                crptPurchaseOrderReport1 crptPurchaseOrderReport1 = new crptPurchaseOrderReport1();
                foreach (DataTable dtbl in dsPurchaseOrderReport.Tables)
                {
                    if (dtbl.TableName == "Table")
                    {
                        crptPurchaseOrderReport1.Database.Tables["dtblCompany"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table1")
                    {

                        crptPurchaseOrderReport1.Database.Tables["dtblPurchaseOrderReport"].SetDataSource(dtbl);
                    }
                }
                crptPurchaseOrderReport1.Database.Tables["dtblTotal"].SetDataSource(dtblTotalAmount);
                this.crptViewer.ReportSource = crptPurchaseOrderReport1;
                SettingsSP spSettings = new SettingsSP();
                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }
                else
                {
                    crptPurchaseOrderReport1.PrintToPrinter(1, false, 0, 0);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("CRV" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }