May I have calculate fiedl in typedlists

Posts   
 
    
nopchan
User
Posts: 56
Joined: 30-Apr-2005
# Posted on: 20-Sep-2005 02:41:33   

May I have calculate field in typedlists

select code,qty,cost,qty*cost as netamount from parts

Drewes
User
Posts: 67
Joined: 18-Aug-2003
# Posted on: 20-Sep-2005 03:10:25   

That is not possible, you might consider using a creating a view in the database itself and using that, however views can't be used in typed lists.

Paul.Lewis
User
Posts: 147
Joined: 22-Aug-2005
# Posted on: 20-Sep-2005 04:44:01   

nopchan wrote:

May I have calculate field in typedlists

select code,qty,cost,qty*cost as netamount from parts

You should be able to add an expression to a dynamic list that will give you the desired results.

Take a look at this page in the LLBLGen User Manual:

Generated code - Field expressions and aggregates

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 20-Sep-2005 09:57:50   

Actually, you can, with a workaround: derive a class from your typedlist class and override the routine which builds the resultset (this depends on what you're using: adapter or selfservicing), then add the expression object as Paul suggested, to the field.

Frans Bouma | Lead developer LLBLGen Pro