Windows Forms End-User Report Designer–Custom Field Icons (coming in v2010 vol 2)

DevExpress Data Blog
22 November 2010

Coming in v2010 vol 2 we have added the ability to provide custom images for field list elements in the end-user report designer. Take a look:


The best way to do this is to add a new component and drag on an image collection (you could also create an image collection from scratch) and then inherit from the IFieldListService interface that lives in the DevExpress.XtraReports.UserDesigner namespace. If you go the component route, you select images just as you would expect:


Once you implement the interface, there are only 4 methods that need to be overridden. The one of most interest is the GetColumnImageIndex function that returns the index of the images. Take a look:

  1: public int GetColumnImageIndex(PropertyDescriptor property, string dataMember, bool isList)
  2: {
  3:     if (dataMember == "Categories")
  4:         return 1;
  5:     if (dataMember == "Customers")
  6:         return 2;
  7:     if (dataMember == "Employees")
  8:         return 3;
  9:     if (dataMember == "Orders")
 10:         return 4;
 12:     return 0;
 13: }

As always, if there are any questions and/or comments, do feel free to get a hold of me!

Seth Juarez
Twitter: @SethJuarez

FREE DevExpress Xamarin UI Controls

Deliver high-impact native mobile apps with our feature-rich Data Grid, Scheduler, Chart, TabView, Editors, and utility controls. Reserve your free copy today!
Michael Proctor [DX-Squad]
Michael Proctor [DX-Squad]

I have only just started implementing End User Designer support for my application, and all I can say is it is freaking brilliant.

Adding things like this only make it better. Well Done.

22 November 2010
Alex Boston
Alex Boston

If this will integrate with XAF if we define an image on filed level.

this this will be really a good thing

23 November 2010

Please login or register to post comments.