public ActionResult ISR050_GetRptPOSubPriceData(string strMaintenanceNo, string strSubcontractorCode) { strMaintenanceNo = "5020N20110030"; strSubcontractorCode = "00002"; IReportHandler reportHandler = ServiceContainer.GetService <IReportHandler>() as IReportHandler; List <RPTPOSubPriceDo> rptList = reportHandler.GetRptPOSubPriceData(strMaintenanceNo, strSubcontractorCode); IDocumentHandler dochandler = ServiceContainer.GetService <IDocumentHandler>() as IDocumentHandler; List <tbm_DocumentTemplate> dLst = dochandler.GetDocumentTemplateByDocumentCode(DocumentCode.C_DOCUMENT_CODE_INSTALL_PO); ReportDocument rptH = new ReportDocument(); string path = ReportUtil.GetReportPath("Reports/ISR050_InstallationPO.rpt", Server.MapPath("/")); rptH.Load(path); List <RPTPOSubPriceDo> lst = new List <RPTPOSubPriceDo>(); lst.Add(rptList[0]); if (dLst.Count > 0) { lst[0].DocumentNameEN = dLst[0].DocumentNameEN; lst[0].DocumentVersion = dLst[0].DocumentVersion; } rptH.SetDataSource(lst); Stream stream = rptH.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat); rptH.Close(); return(File(stream, "application/pdf")); }