Beispiel #1
0
        /// <summary>
        /// 根据参数信息获取Mstr报表地址
        /// </summary>
        /// <param name="pReportID">报表标识</param>
        /// <param name="pQueryParameter">查询条件信息</param>
        public string GetMstrUrl(PromptAnswerItem[] pQueryParameter, DataRigthHierachy pDataRigthHierachy)
        {
            var userInfo = new ReportUserInfo()
            {
                UserID = CurrentUserInfo.UserID, ClientID = CurrentUserInfo.ClientID
            };;
            var mstrReportUtil = new MstrReportUtil((int)Session["MstrSSO_MstrIntegrationSessionID"], this.MstrReportGuid, userInfo);

            return(mstrReportUtil.GetMstrUrl(pQueryParameter, null));
        }
Beispiel #2
0
 /// <summary>
 /// 获取报表访问路径
 /// </summary>
 /// <param name="pMstrIntegrationSessionID">Mstr集成组件生成的会话标识</param>
 /// <param name="pReportGuid">报表标识</param>
 /// <param name="pClientId">客户标识</param>
 /// <param name="pUserId">用户标识</param>
 /// <param name="pPromptAnswers">提问回答信息</param>
 /// <param name="pDataRigthHierachy">数据权限信息</param>
 /// <returns>Mstr报表访问Url</returns>
 public string GetMstrReportUrl(int pMstrIntegrationSessionID, string pReportGuid, string pClientId, string pUserId, MstrPromptAnswerItem[] pPromptAnswers, MstrDataRigthPromptAnswerItem[] pDataRigthPromptAnswers)
 {
     JIT.Utility.Log.Loggers.Debug(new JIT.Utility.Log.DebugLogInfo()
     {
         ClientID = pClientId, UserID = pUserId, Message = "接收到请求.获取报表访问路径:[" + pMstrIntegrationSessionID + "]"
     });
     try
     {
         PromptAnswerItem[] promptAnswers;
         if (pPromptAnswers == null)
         {
             promptAnswers = new PromptAnswerItem[0] {
             }
         }
         ;
         else
         {
             promptAnswers = new PromptAnswerItem[pPromptAnswers.Length];
         }
         //foreach (var item in pPromptAnswers)
         for (int i = 0; i < pPromptAnswers.Length; i++)
         {
             var item = pPromptAnswers[i];
             PromptAnswerItem promptAnswerItem = new PromptAnswerItem();
             promptAnswerItem.PromptCode     = item.PromptCode;
             promptAnswerItem.PromptType     = 0;
             promptAnswerItem.QueryCondition = item.QueryCondition;
             promptAnswers[i] = promptAnswerItem;
         }
         DataRigthHierachy dataRigthHierachy = new DataRigthHierachy();
         if (pDataRigthPromptAnswers != null)
         {
             foreach (var item in pDataRigthPromptAnswers)
             {
                 dataRigthHierachy.Add(item.Level, item.Values);
             }
         }
         ReportUserInfo userInfo = new ReportUserInfo();
         userInfo.ClientID = pClientId;
         userInfo.UserID   = pUserId;
         MstrReportUtil mstrReportUtil = new MstrReportUtil(pMstrIntegrationSessionID, pReportGuid, userInfo);
         var            mstrUrl        = mstrReportUtil.GetMstrUrl(promptAnswers, dataRigthHierachy);;
         JIT.Utility.Log.Loggers.Debug(new JIT.Utility.Log.DebugLogInfo()
         {
             ClientID = pClientId, UserID = pUserId, Message = "处理请求完成.mstrUrl:[" + mstrUrl + "]"
         });
         return(mstrUrl);
     }
     catch (Exception ex)
     {
         JIT.Utility.Log.Loggers.Exception(new JIT.Utility.Log.ExceptionLogInfo(ex));
     }
     return(string.Empty);
 }