Beispiel #1
0
        public override ReportTitles GetReportTitles(IRptParams filter)
        {
            var           result       = base.GetReportTitles(filter);
            DynamicObject customFilter = filter.FilterParameter.CustomFilter;

            if (customFilter != null)
            {
                if (result == null)
                {
                    result = new ReportTitles();
                }

                string dimension = string.Empty;
                string desc      = string.Empty;
                if (customFilter["F_xy_Dimension"] != null)
                {
                    dimension = customFilter["F_xy_Dimension"].ToString();
                }

                desc = ElementGenerator.GetTitleByDimension(dimension);

                result.AddTitle("F_xy_Title", "年度公司商机登录数量" + desc);
                result.AddTitle("F_xy_Year", "年度: " + string.Format("{0:yyyy}", customFilter["F_xy_Year"]) + "      ");
            }
            return(result);
        }
Beispiel #2
0
        public override ReportHeader GetReportHeaders(IRptParams filter)
        {
            DynamicObject customFilter = filter.FilterParameter.CustomFilter;

            if (customFilter["F_xy_Dimension"] == null || customFilter["F_xy_Year"] == null)
            {
                throw new Exception("未选择维度或年份条件");
            }

            string       dimension = customFilter["F_xy_Dimension"].ToString();
            ReportHeader header    = ElementGenerator.GetHeaderByDimension(dimension);

            return(header);
        }
Beispiel #3
0
        public override void BuilderReportSqlAndTempTable(IRptParams filter, string tableName)
        {
            base.BuilderReportSqlAndTempTable(filter, tableName);

            DynamicObject customFilter = filter.FilterParameter.CustomFilter;

            if (customFilter["F_xy_Dimension"] == null || customFilter["F_xy_Year"] == null)
            {
                throw new Exception("未选择维度或年份条件");
            }

            string dimension  = customFilter["F_xy_Dimension"].ToString();
            string year       = customFilter["F_xy_Year"].ToString();
            string billStatus = customFilter["F_xy_BillStatus"].ToString();
            string sql        = ElementGenerator.GetSqlByDimension(dimension, year, billStatus, tableName);

            DBUtils.ExecuteDynamicObject(this.Context, sql);
        }