473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Local Report with Object DataSource: BindingList in Table?

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
Jun 7 '06 #1
1 3835
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(rptSourc e4)
"Pieter" <pi**********@hotmail.com> wrote in message
news:%2****************@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

Jun 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Edward | last post by:
ACCESS 2k I need to design a report based on a rota system for staff at various shops. The data is effectively stored in a single table, along the lines of: Initials (e.g. BH, FG, RM etc.)...
6
by: vickie | last post by:
I have a sql server7 database using C#. The system runs fine until the user try to run a report. I get the following error: Object reference not set to an instance of an object. Description: An...
3
by: FeveZ | last post by:
I've been stuck on a problem now for ages and i'm about ready to pack my project in because of it lol. OK here is my scenario. I have an existing Crystal Report, which I have added to my...
0
by: g18c | last post by:
Hi, i have a class which has a property which is a list of items. I want to be able to set this item list from a set of items (in this case list2 as shown in the code below) from a drop down combo...
1
by: Pieter | last post by:
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...
3
by: connected | last post by:
I'm having difficulty with populating a DataGridView control with data correctly. It works with a single class, for example... class MyClass { private string _propertyOne; private string...
5
by: =?Utf-8?B?RWl0YW4=?= | last post by:
Hello, I am writing an application in c#. I have a List object that I would like to bind it to a DataGridView control. Can I do that, and if so how? If I can not do that, is there any other...
3
by: cowznofsky | last post by:
I'm getting data in a generic list class, which I'm not going to change. I would like to use it as a datasource for a datagrid or a gridview, but it doesn't implement IEnumerable. I'm...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.