Current filter:
                                You should refresh the page.
                                  • Hello,

                                    I am trying to assign a List<string> or List<object> as a DataSource for an XtraReport but then I have problems with databinding.

                                    Is it possible to do a databinding of such list to a XRTable ?
                                    Is it possible to do a databinding to XRLabel by filling the Expression property by using an index ? Something like Expression =  [0]

                                    I tried to find it in the documentation but had no luck.

                                    I tried also to create the databinding using the wizard but it forces me to choose a property of the list element by it's name.
                                    I hope it will be possible because we really need it.

                                    A generic List<T> descends from IList so it is possible however I am afraid that the using the indexer to bind an element is not possible.
                                    I am not sure but I suspect the XtraReport is using reflection internally to access the properties and values of the IList data source
                                    and expects to have a complex object as list item.

                                    Hopefully I am wrong and there is a way to use the index of the item to do the binding.

                                1 Solution

                                Creation Date Importance Sort by

                                Hello,
                                Our reporting controls can be bound to a data source's fields only by their names. As a workaround, you can generate a report table at runtime and fill the table with data as illustrated in the Programatically binding an XRTableCell to a list index ticket. Should you have further questions, let me know.