SUM - Group By clause

Posts   
 
    
Fredz
User
Posts: 1
Joined: 17-Aug-2007
# Posted on: 17-Aug-2007 10:05:12   

Hello,

I'm using version 2.0.0.0 LLBLGen Pro and I'm trying to create a typed list with a sum on some fields. So I can choose sum in the fields mapped on entityfields tab, aggregate function column, but I can't choose group by for the other fields. I left those at none but than I get an error when I use the the typed list in code. Fields not contained in aggregate function and there is no group by clause

What am I doing wrong here

confused

Walaa avatar
Walaa
Support Team
Posts: 14987
Joined: 21-Aug-2005
# Posted on: 17-Aug-2007 10:22:29   

Copied from the manual "Using the designer -> Adding typed lists":

Per field added to the Typed List, you can specify an aggregate function. This can be handy if you want to use a group by collection at runtime. Group by collections aren't included in the designer to give you the flexibility to define multiple group by collections.

So you should pass a groupByCollection to the TypedList fetch method.