コード例 #1
0
        public ReportFieldCollection GetFields()
        {
            var fields     = new ReportFieldCollection();
            var itemType   = GetItemType();
            var properties = GetProperties(itemType);

            if (properties == null)
            {
                return(fields);
            }

            var fieldsOrder = new Dictionary <ReportField, int>();

            foreach (var propInfo in properties)
            {
                var reportField = new ReportField(propInfo.Name, propInfo.PropertyType);
                var order       = SetReportFieldProperties(itemType, propInfo, reportField);
                fieldsOrder.Add(reportField, order);
            }

            // Add the fields with the requested order
            foreach (var field in fieldsOrder.OrderBy(kv => kv.Value).Select(kv => kv.Key))
            {
                fields.Add(field);
            }

            return(fields);
        }
コード例 #2
0
        public ReportFieldCollection GetFields()
        {
            var fields = new ReportFieldCollection();

            foreach (DataColumn column in _table.Columns)
            {
                fields.Add(column.ColumnName, column.DataType);
            }
            return(fields);
        }
コード例 #3
0
        public ReportFieldCollection GetFields()
        {
            var fields = new ReportFieldCollection();

            foreach (SPField field in CustomFields)
            {
                fields.Add(field.Title, field.FieldValueType);
            }
            return(fields);
        }
コード例 #4
0
        /// <summary>
        /// Return a list of all columns this report knows about. These will be come the column headers
        /// </summary>
        /// <returns></returns>
        public ReportFieldCollection GetFields()
        {
            ReportFieldCollection result = new ReportFieldCollection();

            result.Add("TheRowName", typeof(string));
            foreach (var col in _table.ListOfColumns)
            {
                result.Add(col, typeof(float));
            }

            return result;
        }
コード例 #5
0
        /// <summary>
        /// Return a list of all columns this report knows about. These will be come the column headers
        /// </summary>
        /// <returns></returns>
        public ReportFieldCollection GetFields()
        {
            ReportFieldCollection result = new ReportFieldCollection();

            result.Add("TheRowName", typeof(string));
            foreach (var col in _table.ListOfColumns)
            {
                result.Add(col, typeof(float));
            }

            return(result);
        }
コード例 #6
0
        internal ReportRow(ReportRowType rowType, ReportFieldCollection fields, IReportSource source, object dataItem)
        {
            RowType  = rowType;
            DataItem = dataItem;

            Fields = new RowFieldCollection(fields);
            foreach (ReportField field in fields)
            {
                RowField rowField = new RowField(field);
                _fieldData[rowField] = source.GetFieldValue(dataItem, field.Name);
            }
        }
コード例 #7
0
        public ReportFieldCollection GetFields()
        {
            var fields = new ReportFieldCollection();
            var item = _source.FirstOrDefault();

            if (item == null)
                return fields;

            foreach (var t in item)
            {
                fields.Add(t.Key, t.Value.GetType());
            }

            return fields;
        }