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

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        private void GetReport()
        {
            if (Request.QueryString["Orderno"] != null)
            {
                //int ID = 0;

                //int len = Request.QueryString["ID"].ToString().Split('-').Length;
                //if (len > 1) //if the input is OrderNumber
                //{ ID = Convert.ToInt32(BAL.Common.GetScalarBySQLQuery("select ID from OrderSummary where OrderNo='" + Request.QueryString["ID"].ToString() + "'")); }
                //else
                //{ ID = Convert.ToInt32(Request.QueryString["ID"].ToString()); }
                OrderRpt objRpt = new OrderRpt();
                crystalReport = objRpt;
                a.ExcecuteQuery("select * from OrderTable t1 inner join ProductTable t2 on t1.P_id=t2.P_id where t1.Order_no='" + Request.QueryString["Orderno"].ToString() + "'");
                crystalReport.SetDataSource(a.DT);
                crystalReport.SetParameterValue("OrderNo", Request.QueryString["Orderno"].ToString());
                crystalReport.SetParameterValue("Date", Request.QueryString["date"].ToString());
                CrystalReportViewer1.ReportSource = crystalReport;
            }
        }