Binding object properties in Detail section from a generic collection

3 posts, 0 answers
  1. Klemen Slavič
    Klemen Slavič avatar
    21 posts
    Member since:
    Jul 2009

    Posted 15 Jan 2010 Link to this post

    Hello,

    I've been trying to create a mock sample data set to use on a report in design-time; basically, it's a simple class that with a public static function that returns an object with a property that contains a List generic collection containing additional objects.

    When binding this object in the NeedDataSource event handler, it works when binding to the object itself; however, I implemented a SubReport in the master report to list the objects contained in the List collection. Here's where the problem gets blurry.

    I implemented a NeedDataSource on the report (contained in the master report as a subreport) that assigns the List collection of objects to the report. I then use the binding syntax to bind to the object's properties, but the expression does not return a value, rather it's blank. The number of displayed table cells matches the number of objects in the List collection, but no values of fields are displayed.

    Example: object in List contains the "Ime" property; neither =Ime or =Fields.Ime displays the value. Also, using just any binding expression doesn't result in an error (like =Foo).
  2. Chris Gillies
    Chris Gillies avatar
    384 posts
    Member since:
    May 2006

    Posted 15 Jan 2010 Link to this post

    Klemen, check out the following threads:

    • http://www.telerik.com/community/forums/reporting/telerik-reporting/how-to-display-hierarchical-collections.aspx
    • http://www.telerik.com/community/forums/reporting/telerik-reporting/linq-or-business-object-datasource.aspx

    Cheers


  3. DevCraft banner
  4. Klemen Slavič
    Klemen Slavič avatar
    21 posts
    Member since:
    Jul 2009

    Posted 18 Jan 2010 Link to this post

    Thanks, I'll look into those.
Back to Top