Description:
I'm using the System.Collections.Generic.List collection as a report's datasource.
I set it like this:
[C#]List<MyObject>list=newList<MyObject>();report.Datasource=list;
How do I change/specify the names in the field list with my desired display name?
Solution:
You should implement the IDisplayNameProvider(IDataDictionaryin versions prior to v2011 vol 2) interface over your collection object. The IDisplayNameProvider interface has two methods that will help to change the display name of the required field. In the attached sample I show how you can change the display name, by using the custom attributes implemented over the Business Objects properties.
See also: How to provide custom names for the Field List data items.