/// <summary> /// GetXR /// </summary> /// <returns></returns> XtraReport GetXR(decimal rptId) { EntityOutpatientInterview Vo = null; using (ProxyAdverseEvent proxy = new ProxyAdverseEvent()) { Vo = proxy.Service.GetInterviewVo(rptId); } EntityFormDesign formVo = null; EntityEmrPrintTemplate printVo = null; using (ProxyFormDesign proxy = new ProxyFormDesign()) { proxy.Service.GetForm(64, out formVo); if (formVo == null) { return(null); } printVo = proxy.Service.GetFormPrintTemplate(1, formVo.Printtemplateid.ToString()); } DataTable printDataSource = FormTool.GetPrintDataTable(formVo.Layout, Vo.xmlData); if (printVo.templateFile != null && printVo.templateFile.Length > 0) { XtraReport xr = new XtraReport(); MemoryStream stream = new MemoryStream(printVo.templateFile); xr.LoadLayout(stream); xr.DataSource = printDataSource; return(xr); } else { return(null); } }
/// <summary> /// GetXR /// </summary> /// <returns></returns> XtraReport GetXR() { EntityFormDesign formVo = null; EntityEmrPrintTemplate printVo = null; using (ProxyFormDesign proxy = new ProxyFormDesign()) { proxy.Service.GetForm((int)this.formId, out formVo); if (formVo == null) { return(null); } printVo = proxy.Service.GetFormPrintTemplate(1, formVo.Printtemplateid.ToString()); } DataTable printDataSource = FormTool.GetPrintDataTable(formVo.Layout, Viewer.showPanelForm.XmlData()); if (printVo.templateFile != null && printVo.templateFile.Length > 0) { XtraReport xr = new XtraReport(); MemoryStream stream = new MemoryStream(printVo.templateFile); xr.LoadLayout(stream); xr.DataSource = printDataSource; return(xr); } else { return(null); } }
/// <summary> /// GetXR /// </summary> /// <returns></returns> XtraReport GetXR(decimal rptId) { EntityRptContagion contagionVo = null; using (ProxyContagion proxy = new ProxyContagion()) { contagionVo = proxy.Service.GetContagion(rptId); } EntityFormDesign formVo = null; EntityEmrPrintTemplate printVo = null; using (ProxyFormDesign proxy = new ProxyFormDesign()) { proxy.Service.GetForm((int)contagionVo.formId, out formVo); if (formVo == null) { return(null); } printVo = proxy.Service.GetFormPrintTemplate(1, formVo.Printtemplateid.ToString()); } DataTable printDataSource = FormTool.GetPrintDataTable(formVo.Layout, contagionVo.xmlData); if (printVo.templateFile != null && printVo.templateFile.Length > 0) { XtraReport xr = new XtraReport(); MemoryStream stream = new MemoryStream(printVo.templateFile); xr.LoadLayout(stream); xr.DataSource = printDataSource; return(xr); } else { return(null); } }