/// <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; }
/// <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); }
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); }
public ReportFieldCollection GetFields() { var fields = new ReportFieldCollection(); foreach (DataColumn column in _table.Columns) { fields.Add(column.ColumnName, column.DataType); } return(fields); }
public ReportFieldCollection GetFields() { var fields = new ReportFieldCollection(); foreach (SPField field in CustomFields) { fields.Add(field.Title, field.FieldValueType); } return(fields); }
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; }