How to calculation on child doctype

i have doctype ‘Material Request’ which is child doctype


and i want calculate Amount = Rate * Quantity
but this is child doctype can’t able to write script on this doctype i want to calculate
Amount = Rate * Quantity

Please check the syntax: Calculate (SUM) two fields and display the result on the third field on child table - #2 by NCP