Example #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            OfficialReceipt rpt = new OfficialReceipt();

            rpt.Site = this.Site;
            return(rpt);
        }
Example #2
0
        private void ORVibtn_Click(object sender, EventArgs e)
        {
            if (ORvirbtn.Checked == true)
            {
                ORnumtxt.Text    = "";
                ORnumtxt.Enabled = false;

                BalloonKingdomDataSetTableAdapters.Official_ReceiptTableAdapter orview = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.Official_ReceiptTableAdapter();
                DataTable datatable = orview.ViewAll();

                Official_Receipt_Masterlist rpt = new Official_Receipt_Masterlist();

                OfficialReceipt orpt = new OfficialReceipt();
                orpt.SetDataSource(datatable);

                rpt.AssignORReport(orpt);
                rpt.Show();
            }

            else
            {
                if ((ORnumtxt.Text != "" && ORUptxt.Text == "") || (ORnumtxt.Text == "" && ORUptxt.Text != "") || (ORnumtxt.Text == "" && ORUptxt.Text == ""))
                {
                    MessageBox.Show("Please enter an OR ID", "Information", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }

                else
                {
                    int a = Convert.ToInt32(ORnumtxt.Text);
                    int b = Convert.ToInt32(ORUptxt.Text);
                    BalloonKingdomDataSetTableAdapters.Official_ReceiptTableAdapter ornum = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.Official_ReceiptTableAdapter();
                    DataTable datatable = ornum.orselect(a, b);

                    Official_Receipt_Masterlist rpt = new Official_Receipt_Masterlist();

                    OfficialReceipt orpt = new OfficialReceipt();
                    orpt.SetDataSource(datatable);

                    rpt.AssignORReport(orpt);
                    rpt.Show();
                }
            }
        }
 public void AssignORRep(OfficialReceipt rpt)
 {
     crystalReportViewer1.ReportSource = rpt;
 }