Local Report with Object DataSource: BindingList in Table?

P

Pieter

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
 
P

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top