|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Local Report with Object DataSource: BindingList in Table?I'm using VB.NET 2005 with a Local Report, and I used an Object as DataSource. The problem is: this Objects contains a Generic List (MyArticles, Inherist from BindingList), which contains other objects (Articles). I want a list of these Articles to appear in a table in my report, but I don't know how to do this. In the "Data Sources"-Window I can see the MyArticles-list, with the property's of the objects in it. But I can't drag and drop the List nor one of the Property's to the Report or a Table in the Report. Does anybody knows how I have to do this? Do I need to add the Article-object as a DataSource and change some things at runtime? Any help our hints would be really appreciated! A working sample would be great! :-) Thanks a lot in advance, Pieter Well, aparently it worked...
I used just an object to bind the Articles to the Table, and than used the List as Datasource during runtime: Dim bs4 As New BindingSource bs4.DataSource = CType(Me.m_Document, clsCommande).MyArticles Dim rptSource4 As New Microsoft.Reporting.WinForms.ReportDataSource rptSource4.Name = "MyApplication_clsArticle" rptSource4.Value = bs4 Me.rpvwReport.LocalReport.DataSources.Add(rptSource4) Show quote "Pieter" <pietercou***@hotmail.com> wrote in message news:%23dqbBYiiGHA.4368@TK2MSFTNGP03.phx.gbl... > Hi, > > I'm using VB.NET 2005 with a Local Report, and I used an Object as > DataSource. > The problem is: this Objects contains a Generic List (MyArticles, Inherist > from BindingList), which contains other objects (Articles). I want a list > of these Articles to appear in a table in my report, but I don't know how > to do this. > > In the "Data Sources"-Window I can see the MyArticles-list, with the > property's of the objects in it. But I can't drag and drop the List nor > one of the Property's to the Report or a Table in the Report. > > Does anybody knows how I have to do this? Do I need to add the > Article-object as a DataSource and change some things at runtime? > > Any help our hints would be really appreciated! A working sample would be > great! :-) > > Thanks a lot in advance, > > Pieter > |
|||||||||||||||||||||||