Example #1
0
        public void Assemble(
            Hashtable meta,
            ReportCenterUiStateHandler reportCenterUiStateHandler,
            bool is4ReportDataForVB6)
        {
            // 报表元数据
            this.ClearData();
            DataTable dt = null;

            // 我的发布,我的接收
            this._rawMeta[ReportCenterDataService.KEY_MyPublish]           = meta[ReportCenterDataService.KEY_MyPublish] as DataTable;
            this._rawMeta[ReportCenterDataService.KEY_MyAcception]         = meta[ReportCenterDataService.KEY_MyAcception] as DataTable;
            this._rawMeta[ReportCenterDataService.KEY_ReportCenterCatalog] = meta[ReportCenterDataService.KEY_ReportCenterCatalog] as DataTable;

            // BS门户不需要报表中心的状态数据
            // 报表中心状态
            if (!is4ReportDataForVB6)
            {
                dt = meta[ReportCenterDataService.KEY_UAP_ReportMyReport] as DataTable;
                if (dt.Rows.Count > 0)
                {
                    DataRow dr  = dt.Rows[0];
                    string  xml = SqlHelper.GetStringFrom(dr["DataStructure"]);
                    reportCenterUiStateHandler.Xml2Obj(xml);
                    foreach (string k in reportCenterUiStateHandler.DataKeys)
                    {
                        this._hashData[k] = reportCenterUiStateHandler.HashData[k];
                    }
                }
            }

            // 非静态报表权限
            this._hashData[ReportCenterDataService.KEY_ReportAuth] = meta[ReportCenterDataService.KEY_ReportAuth] as Hashtable;

            // 根据某些特殊业务规则来控制相应标准报表的可见性
            this._standardReportMenuRuleHandler.Init(
                meta[ReportCenterDataService.KEY_BusinessRule1] as DataTable,
                meta[ReportCenterDataService.KEY_BusinessRule2] as DataTable);

            Hashtable sysInfos          = meta[ReportCenterDataService.KEY_SystemInfo] as Hashtable;
            Hashtable u861FormatRelated = meta[ReportCenterDataService.KEY_U861FormatRelated] as Hashtable;
            Hashtable isUsingU861Format = meta[ReportCenterDataService.KEY_IsUsingU861Format] as Hashtable;

            string[] keys = new string[] {
                ReportCenterDataService.KEY_ReportMata,
                ReportCenterDataService.KEY_StaticReport
            };
            foreach (string k in keys)
            {
                dt = meta[k] as DataTable;
                foreach (DataRow dr in dt.Rows)
                {
                    this.FormOneReport(k, dr, sysInfos, u861FormatRelated, isUsingU861Format);
                }
            }
        }
        public Dictionary <string, Reports> GetData4ReportDataForVB6(object vbLogin)
        {
            this._loginInfo = new U8LoginInfor(vbLogin);
            ReportCenterUiStateHandler uihandler = new ReportCenterUiStateHandler();
            ReportCenterObjAssembler   assembler = new ReportCenterObjAssembler(null, this._loginInfo);
            Hashtable meta = this.GetData(true, false);

            assembler.Assemble(meta, uihandler, true);
            return(assembler.ReportInfo);
        }
Example #3
0
 public void Assemble(
     Hashtable meta,
     ReportCenterUiStateHandler reportCenterUiStateHandler)
 {
     this.Assemble(meta, reportCenterUiStateHandler, false);
 }