This topic is locked
[SOLVED]

 sum alias field on master detail table

6/18/2011 3:16:57 PM
PHPRunner General questions
hapony author

Hi All,

i'm new at PHPRunner, and i need help

i have 1 table Master and 1 table detail,

the table detail has a Alias Field Collum, thats calculate 2 field in current table detail,

and i want to sum value on total alias field in table detail, and the result is updated on table Master
case example :

==============

Master_Table

==============

customer_id

customer_name

service_item

total_bill
==============

Detail_Table

==============

customer_id

Sparepartname

Price

quantity

subtotal >> this is alias field with value from calculate price * quantity
because it's always more than one record on the Detail_table,

so i want to SUM the subtotal and update the result in total_bill field on Master_table
I am very grateful if any one could help

Regard
Boni
It's done already ,

only set the Total Type on TAB Field Order and Total

thanks PHPRUNNER.. u d'Best

hapony author 6/19/2011

Any HELP PLease ?

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=58915&image=1&table=forumreplies' class='bbc_emoticon' alt=':unsure:' />



Hi All,

i'm new at PHPRunner, and i need help

i have 1 table Master and 1 table detail,

the table detail has a Alias Field Collum, thats calculate 2 field in current table detail,

and i want to sum value on total alias field in table detail, and the result is updated on table Master
case example :

==============

Master_Table

==============

customer_id

customer_name

service_item

total_bill
==============

Detail_Table

==============

customer_id

Sparepartname

Price

quantity

subtotal >> this is alias field with value from calculate price * quantity
because it's always more than one record on the Detail_table,

so i want to SUM the subtotal and update the result in total_bill field on Master_table
I am very grateful if any one could help

Regard
Boni