public ActionResult IVS284_GenerateReport(doIVS284SearchCondition reportParam) { IVS284_ScreenParameter param = GetScreenObject <IVS284_ScreenParameter>(); ObjectResultData res = new ObjectResultData(); res.MessageType = MessageModel.MESSAGE_TYPE.WARNING; try { if (reportParam == null || reportParam.ContractCodeSelected == null || reportParam.ContractCodeSelected.Length == 0) { res.AddErrorMessage(MessageUtil.MODULE_COMMON, MessageUtil.MessageList.MSG0006); } else { if (param.LastSearchParam == null) { param.LastSearchParam = reportParam; } IInventoryHandler service = ServiceContainer.GetService <IInventoryHandler>() as IInventoryHandler; var lst = service.GetStockReport_InprocessToInstall_Detail(new doIVS284SearchCondition() { ReportType = param.LastSearchParam.ReportType, ContractCode = null, ContractCodeSelected = reportParam.ContractCodeSelected, YearMonth = param.LastSearchParam.YearMonth, }); IInventoryDocumentHandler docService = ServiceContainer.GetService <IInventoryDocumentHandler>() as IInventoryDocumentHandler; param.PendingDownloadFilePath = docService.GenerateIVS284InprocessToInstallReport(param.LastSearchParam.ReportType, lst, param.LastSearchParam); param.PendingDownloadFileName = "InprocessToInstallReport.xlsx"; res.ResultData = true; } } catch (Exception ex) { res.MessageType = MessageModel.MESSAGE_TYPE.INFORMATION; res.AddErrorMessage(ex); } return(Json(res)); }