Пример #1
0
        public void Print()
        {
            frmViewReport oViewReport = new frmViewReport();

            DataSet ds = new DataSet();

            ds.Tables.Add(Global.oMySql.GetDataTable(String.Format("Select * From OrderTicket Where ID='{0}'", ID), "Ticket"));
            ds.Tables.Add(Global.oMySql.GetDataTable(String.Format("Select * From OrderTicketDetail Where TicketID='{0}'", ID), "TicketDetail"));
            ds.Tables.Add(Global.oMySql.GetDataTable(String.Format("Select * From Product Where Password='******'", this.Password), "Product"));


            TicketReport oRpt = new TicketReport();

            //ds.WriteXml("PrintTicket1.xml", XmlWriteMode.WriteSchema);

            oRpt.SetDataSource(ds);
            oRpt.SetParameterValue("CompanyName", "Signature Fundraising, Inc.");

            oViewReport.cReport.ReportSource = oRpt;
            oViewReport.Show();
            //oViewReport.cReport.PrintReport();
        }
Пример #2
0
        public void Print()
        {
            frmViewReport oViewReport = new frmViewReport();

            DataSet ds = new DataSet();

            ds.Tables.Add(oMySql.GetDataTable(String.Format("Select * From Customer c Left Join Orders o On c.CustomerID=o.CustomerID And c.CompanyID=o.CompanyID  Where o.ID='{0}'", this.OrderID), "Customer"));
            ds.Tables.Add(oMySql.GetDataTable(String.Format("Select * From OrderTicket Where ID='{0}'", ID), "Ticket"));
            ds.Tables.Add(oMySql.GetDataTable(String.Format("Select * From OrderTicketDetail Where TicketID='{0}'", ID), "TicketDetail"));
            ds.Tables.Add(oMySql.GetDataTable(String.Format("Select * From Orders Where ID='{0}'", this.OrderID), "Orders"));
            ds.Tables.Add(oMySql.GetDataTable(String.Format("Select * From Product Where ProductID='{0}'", this.ProductID), "Product"));


            TicketReport oRpt = new TicketReport();

            //ds.WriteXml("PrintTicket1.xml", XmlWriteMode.WriteSchema);

            oRpt.SetDataSource(ds);
            oRpt.SetParameterValue("CompanyName", "Signature Fundraising, Inc.");

            oViewReport.cReport.ReportSource = oRpt;
            oViewReport.Show();
            //oViewReport.cReport.PrintReport();
        }