コード例 #1
0
ファイル: reports_receipt.cs プロジェクト: Russ0410/pos
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            reports_receipt rpt = new reports_receipt();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
ファイル: frmPayment.cs プロジェクト: Russ0410/pos
        private void rpt()
        {
            con.Open();
            DataSet1 ds = new DataSet1();

            adpt = new MySqlDataAdapter("SELECT * FROM tblorder WHERE Order_TransNo = '" + account.TransNo + "'", con);
            adpt.Fill(ds.tblorder);

            reports_receipt receipt = new reports_receipt();

            TextObject text1 = (TextObject)receipt.ReportDefinition.Sections["Section4"].ReportObjects["cashier"];

            text1.Text = account.UserFullName;

            TextObject text2 = (TextObject)receipt.ReportDefinition.Sections["Section4"].ReportObjects["OderType"];

            text2.Text = account.OrderType;

            TextObject text3 = (TextObject)receipt.ReportDefinition.Sections["Section4"].ReportObjects["tableNo"];

            if (account.StrTableNo == "")
            {
                text3.Text = "-";
            }
            else
            {
                text3.Text = account.StrTableNo;
            }

            receipt.SetDataSource(ds);

            frmReceipt rpt = new frmReceipt();

            rpt.crpReceipt.ReportSource = receipt;
            rpt.crpReceipt.RefreshReport();
            rpt.crpReceipt.RefreshReport();

            rpt.ShowDialog();
            con.Close();
        }