SUM of related table fields

5 posts, 0 answers
  1. Ubuntu
    Ubuntu avatar
    89 posts
    Member since:
    Jul 2012

    Posted 24 May 2011 Link to this post

    Dear All,

    I need to create a custom class to fetch some data, so I implement the following LINQ query:

    var dailys = (from Summary in DataContext.summeries
    join Period in DataContext.Periods on Summary.periodid equals Period.periodid
    where
    && Summary.date >= Period.from
    && Summary.date <= Period.to
    select new dailysummaryview
    {
          period = Summary.periodid,
          month = Summary.month,
          total_x = Summary.dailies.Sum(k=>k.x),
          total_y = 8 //Summary.dailies.Sum(k => k.y)
     });
    return dailys;


    I always get the exception of :
    Result type calculation: expected FieldNode, FieldNavNode, LiteralNode, AggregateNode, BinaryNode, ParamNode.

    If I change the total_x to total_x = constant like total_y I got no exceptions.

    What solution could be for that issue... anyboady knows.
    Regards
  2. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 27 May 2011 Link to this post

    Hi Ubuntu,

    thanks for reporting this issue; I will have a look into this on monday.

    Best wishes,
    Thomas
    the Telerik team
    Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
  3. DevCraft banner
  4. Ubuntu
    Ubuntu avatar
    89 posts
    Member since:
    Jul 2012

    Posted 30 May 2011 Link to this post

    Hi Thomas,

    Any updates on the issue ... !!

    Regards
  5. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 03 Jun 2011 Link to this post

    Hello Ubuntu,

    yes, I can reproduce this now.  However I cannot give a concrete day yet when this problem is fixed. I will post here any updates on this.

    Greetings,
    Thomas
    the Telerik team
    Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
  6. Ubuntu
    Ubuntu avatar
    89 posts
    Member since:
    Jul 2012

    Posted 04 Jun 2011 Link to this post

    thanks thomas
    i guess i wil move back to my ef4

    regards
Back to Top
DevCraft banner