Пример #1
0
        /// <summary>
        /// 获取报表的参数集合
        /// </summary>
        /// <param name="sarray"></param>
        /// <returns></returns>
        private ParmDict ParseRPTParams(string[] sarray)
        {
            ParmDict rptParamsDic = new ParmDict();

            string[] spliteResult = null;
            foreach (string s in sarray)
            {
                spliteResult = s.Split(new char[] { '=' });
                if (spliteResult.Length == 2)
                {
                    //参数先加载rpt参数后加载config 参数  rpt中存在的参数,config不覆盖
                    if (!rptParamsDic.ContainsKey(spliteResult[0]))
                    {
                        rptParamsDic.Add(spliteResult[0], spliteResult[1]);
                    }
                }
            }
            return(rptParamsDic);
        }
Пример #2
0
        /// <summary>
        /// 唯一入口
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="s"></param>
        /// <returns></returns>
        public DataTable InitTable(DataSet ds, string[] s)
        {
            rptParamDic            = ParseRPTParams(s);
            rptParamDic.RecordParm = true;

            ParmDict.AllParamDict.Clear();

            ReportDataHelper.RptParamDic = rptParamDic;

            InitReportParam(rptParamDic);

            //初始化DataTable,添加列
            DataTable dt = InitTableColumn(GetColumns());

            //参数设置
            InitReportParam(dt);

            //获取报表的业务数据
            return(GetBusinessData(ds, dt));
        }
Пример #3
0
 protected virtual void InitReportParam(ParmDict rptParamDic)
 {
 }