Support for Fields mapped to deep object graph

7 posts, 1 answers
  1. Jafin
    Jafin avatar
    86 posts
    Member since:
    Nov 2005

    Posted 22 May 2007 Link to this post

    Dear Telerik.

    I have attemped to bind a report to a object graph using values such as:

    1IList<Project> list = GetProjects(); 
    2this.DataSource = list; 
    3textBox1.Value = "=Location.StationName";   

    But I receive the error "The expression contains object 'Location' that is not defined in the current context".

    Does Telerik Reporting allow the querying of fields in a deep object graph to be used in a report?

    Thanks,
    J.



  2. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 23 May 2007 Link to this post

    Hi Jafin,

    Thank you for your question.

    To our great regret in v1 of Telerik Reporting there is no way to bind report items to a deep object graph. The reason is that all properties of the top most object that are of complex types (type is not primitive, String, DataTime, Guid or byte[]) are discarded from the data processing engine. In your case this is the Location property. As we skip this property there is no way how to access the StationName.

    Please excuse us for the inconvenience. We logged the issue in our bug tracking system and will check how to overcome this flow for the next version.
     

    Kind regards,
    Svetoslav
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft banner
  4. pcrane
    pcrane avatar
    5 posts
    Member since:
    May 2007

    Posted 25 May 2007 Link to this post

    I received the same error just trying to bind to a value coming directly out of a query.  "select Description from document_category"?

    this.textBox2.Value = "=Description";

    Any ideas on why I would receive that error here?

    The expression contains object 'Description' that is not defined in the current context.

  5. pcrane
    pcrane avatar
    5 posts
    Member since:
    May 2007

    Posted 25 May 2007 Link to this post

    I forgot to mention that I'm using the OleDbDataAdapter for Oracle.  
  6. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 28 May 2007 Link to this post

    Hello pcrane,

    It seems that your problem is quite different from the one described from Jafin. You can receive a similar error if you're binding a TextBox item that resides in the PageHeader or PageFooter section to a data field. Basically, you cannot use any data field in these sections because they are processed while rendering the report when the data from the data source is not available. For the current v1 you can use data fields only in the DetailSection and GroupHeader/FooterSections.

    If this is not your case, please be more specific and if possible send us your report (in a support ticket) so we be able to examine the issue and send you a resolution.
     

    Best wishes,
    Svetoslav
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. joshuarivers
    joshuarivers avatar
    21 posts
    Member since:
    Jul 2007

    Posted 22 Oct 2007 Link to this post

    Has the problem of binding to a deep object graph been solved in a more recent version?
  8. Answer
    Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 23 Oct 2007 Link to this post

    Hi joshuarivers,

    Yes the latest version of Telerik Reporting Q2 2007 supports deep object graphs and we encourage you to download the latest version and give it a try.

    We will be happy to know your feedback. Thank you.

    Sincerely yours,
    Svetoslav
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top
DevCraft banner