Nested lists

Stimulsoft Reports.NET discussion
Post Reply
Tobias Grimm
Posts: 19
Joined: Tue Oct 23, 2007 9:16 am
Location: Germany

Nested lists

Post by Tobias Grimm »

Having a business object like this:

Code: Select all

var reportData = new ArrayList
{
    new ArrayList
    {
        new BarDto {BarProperty = "Bar Dto #1"},
        new BarDto {BarProperty = "Bar Dto #2"},
    },
    new ArrayList
    {
        new FooDto {FooProperty = "Foo Dto #1"},
        new FooDto {FooProperty = "Foo Dto #2"},
    }
};
...Reports.Net somehow joins the two child lists into a singe data source:

Code: Select all

BarProperty FooProperty
-----------------------
Bar Dto #1  NULL
Bar Dto #2  NULL
NULL        Foo Dto #1
NULL        Foo Dto #2
Is there a way to make those two lists be mapped as separate data sources?

(I think I haven't completely wrapped my mind yet around the way the bussiness object to data source mapping works.)
s/MikeT/Tobias/
Tobias
Posts: 104
Joined: Mon Nov 24, 2008 8:44 am

Nested lists

Post by Tobias »

Forget about this issue. I've found a better way to be completely flexible in dynamically building my report data.

With some ICustomTypeDescriptor magic, I can now simply add "sub reports" as new properties to the parent report, which makes a much easier to use data source model. Works like a charm with Reports.Net!
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Nested lists

Post by Edward »

Hello Tobias.

Thank you for this information and for your good words!

Thank you.
Post Reply