private void btnPrint_Click(object sender, EventArgs e)
        {
            ReportDocument objRptDoc            = new ReportDocument();
            DataSet        dsPrintPOItemsDetail = new DataSet();
            //IMasterList objStockLedger = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            IPurchase objPOItem = (IPurchase)ObjectFactory.CreateInstance("BusinessProcess.SCM.BPurchase,BusinessProcess.SCM");

            dsPrintPOItemsDetail = objPOItem.GetPurchaseOrderDetailsByPoid(GblIQCare.PurchaseOrderID);
            dsPrintPOItemsDetail.WriteXmlSchema(GblIQCare.GetXMLPath() + "\\IntStorePO.xml");
            rptIntStorePOReport rep = new rptIntStorePOReport();

            rep.SetDataSource(dsPrintPOItemsDetail);
            //  rep.ParameterFields["FormDate","1"];
            rep.SetParameterValue("ModePurchaseOrder", GblIQCare.ModePurchaseOrder);
            rep.SetParameterValue("facilityname", GblIQCare.AppLocation);

            // , Convert.ToString(dtpFrom.Text)];

            frmReportViewer theRepViewer = new frmReportViewer();

            theRepViewer.MdiParent             = this.MdiParent;
            theRepViewer.Location              = new Point(0, 0);
            theRepViewer.crViewer.ReportSource = rep;
            theRepViewer.Show();
            this.Close();
        }
Example #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptIntStorePOReport rpt = new rptIntStorePOReport();

            rpt.Site = this.Site;
            return(rpt);
        }