Ejemplo n.º 1
0
        public ActionResult Index(string reportid)
        {
            ReportModel Model = new ReportModel();

            try
            {
                PublishReportRequest PublishReportRequest = new PublishReportRequest();
                PublishReportRequest.ReportInfo.ReportId = reportid;
                PublishReportRequest.IncludHTML          = false;

                PublishReportResponse result = _isurveyFacade.GetSurveyReport(PublishReportRequest);



                Model.DateCreated = result.Reports[0].CreatedDate.ToString();
                Model.Reportid    = result.Reports[0].ReportId;
                StringBuilder html = new StringBuilder();
                foreach (var Gadget in result.Reports[0].Gadgets)
                {
                    html.Append(Gadget.GadgetHtml);
                }
                Model.ReportHtml = html.ToString();

                return(View(Model));;
            }
            catch (Exception ex)
            {
                return(Json(false));
            }
        }
Ejemplo n.º 2
0
        public ActionResult Index(string reportid)
        {
            ReportModel Model = new ReportModel();

            try
            {
                if (!string.IsNullOrEmpty(WebConfigurationManager.AppSettings["Report_API_URL"].ToString()))
                {
                    RefeshReport(reportid);
                }
                //dba3faf6-4417-4f6d-920a-e3d6b680932a
                Epi.Web.Common.Helper.SqlHelper.GetReportXml(reportid);


                PublishReportRequest PublishReportRequest = new PublishReportRequest();
                PublishReportRequest.ReportInfo.ReportId = reportid;
                PublishReportRequest.IncludHTML          = false;

                PublishReportResponse result = _isurveyFacade.GetSurveyReport(PublishReportRequest);



                Model.DateCreated = result.Reports[0].CreatedDate.ToString();
                Model.Reportid    = result.Reports[0].ReportId;
                StringBuilder html = new StringBuilder();
                foreach (var Gadget in result.Reports[0].Gadgets)
                {
                    html.Append(Gadget.GadgetHtml);
                }
                Model.ReportHtml = html.ToString();

                return(View(Model));;
            }
            catch (Exception ex)
            {
                return(Json(false));
            }
        }