示例#1
0
        // add the columns dynamically
        protected void addColumns(Dictionary <string, string> dictDetail)
        {
            foreach (KeyValuePair <string, string> entry in dictDetail)
            {
                ReportColumn reportCol = new ReportColumn();
                string       type      = (Regex.Split(entry.Value, TYPE_VALUE_DELIMITER))[0];
                reportCol.Name       = entry.Key;
                reportCol.Label      = entry.Key;
                reportCol.CanDisplay = true;
                reportCol.CanFilter  = true;

                switch (type)
                {
                case "Integer":
                    reportCol.DataType = ReportColumnType.Integer;
                    break;

                case "String":
                    reportCol.DataType = ReportColumnType.String;
                    break;

                case "DateTime":
                    reportCol.DataType = ReportColumnType.DateTime;
                    break;

                case "Boolean":
                    reportCol.DataType = ReportColumnType.Boolean;
                    break;
                }
                this.Columns.Add(reportCol);
            }
        }
示例#2
0
 // add the columns dynamically
 protected void addColumns(Dictionary <string, ReportColumnType> dictDetail)
 {
     foreach (KeyValuePair <string, ReportColumnType> entry in dictDetail)
     {
         ReportColumn reportCol = new ReportColumn();
         reportCol.Name       = entry.Key;
         reportCol.Label      = entry.Key;
         reportCol.CanDisplay = true;
         reportCol.CanFilter  = false;
         reportCol.DataType   = entry.Value;
         this.Columns.Add(reportCol);
     }
 }
示例#3
0
        // add the columns dynamically
        protected void addColumns(Dictionary<string, string> dictDetail)
        {
            foreach (KeyValuePair<string, string> entry in dictDetail)
            {
                ReportColumn reportCol = new ReportColumn();
                string type = (Regex.Split (entry.Value,TYPE_VALUE_DELIMITER))[0];
                reportCol.Name = entry.Key;
                reportCol.Label = entry.Key;
                reportCol.CanDisplay = true;
                reportCol.CanFilter = true;

                switch (type)
                {
                    case "Integer":
                        reportCol.DataType = ReportColumnType.Integer;
                        break;
                    case "String":
                        reportCol.DataType = ReportColumnType.String;
                        break;
                    case "DateTime":
                        reportCol.DataType = ReportColumnType.DateTime;
                        break;
                    case "Boolean":
                        reportCol.DataType = ReportColumnType.Boolean;
                        break;

                }
                this.Columns.Add(reportCol);
            }
        }
示例#4
0
 // add the columns dynamically
 protected void addColumns(Dictionary<string, ReportColumnType> dictDetail)
 {
     foreach (KeyValuePair<string, ReportColumnType> entry in dictDetail)
     {
         ReportColumn reportCol = new ReportColumn();
         reportCol.Name = entry.Key;
         reportCol.Label = entry.Key;
         reportCol.CanDisplay = true;
         reportCol.CanFilter = false;
         reportCol.DataType = entry.Value;
         this.Columns.Add(reportCol);
     }
 }