locked
How to Bind two Tables of crystal report with two properties of an object RRS feed

  • Question

  • Hi everybody,

    I'am trying to work with the crystal report embeded tools in VS2005.

    I've a object (SessionControlReport) which contains these properties:

    StartDate (DateTime),
    EndDate (DateTime),
    AttributedSessions (List<SessionItem>)
    NotAttributedSession (List<SessionItem>)


    SessionItem is a class in which I've defined some fields like PaymentAmount and so on ( actually, value types)

    SessionControlReport is the object i use to show in my report.

    In my report (report1.rdlc), i would like to show two tables. One for the AttributedSessions property, and the other for the NotAttributedSessions property. Also, i would like to show the field StartDate and EndDate of the SessionControlReport object.

    But, as the two lists contains the same type of object (SessionItem), it create only two DataSet in the Report (file report.rdlc),
    Visual studio 2005 only creates two dataset (one for the SessionControlReport class and one for the SessionItem Class)

    The problem appears when i want to bind my two object list two the reportviewer. As I have only two bindingsource (one for SessionControlReport and one for SessionItem), i can't say that the second table has different datas from the the first.

    I would like to think this is not a limitation two the crystal report tool in VS2005 because i doesn't want to define my own collection (which causes the creation of new datasets I think). (because this would like represent a unnecessary amount of class that I doesn't want to create.

    So, is there a mean to create two dataset for the same type of object which are contains in two different properties of the same parent object?

    Can you please tell me how i've to do with it?

    I Would like to stay in the domain of model object (then no use of dataSet, no use of datatable and so on).

    Thanks a lot to all in advance.


    Mike
    Thursday, October 2, 2008 8:20 AM

All replies

  • Are you sure you are using Crystal Reports? You mentioned '.rdlc' report files but this extension is used in local reports in Reporting Services.

    everything is a matter of probability...
    Tuesday, October 7, 2008 11:12 AM