Drupal Rules, create the SUM of a field decimal values I m running a drupal 7 installation and I need to create a special routine for my site.

I have 2 content types -> "Orders" and "Reports".

The "Order" content type has a field with decimal values called "final_value". Any user can create an order with different "final_value" each.

What I need is when a user creates a new report, a rule must trigger and calculate the SUM of all orders she created from the last time she logged in.

Any ideas??
You could enable PHP filter module (in core package), what will expose a 'run PHP' rule. There you could run some queries. Have a look at db_select and db_query for how to construct them (there are good advices in the comments as well.). 

Proceed with caution though as you are communicating directly against the database. Sanitize the in- and outputs.

If it is only for display purposes, you could achieve a similar effect with Views and aggregation enabled. Enable aggregation in the advanced section. Add the final_value field, and select SUM. This is a much safer approach.

UPDATE

I suppose you are triggering the rule on the save event of the Order-node? In that case the Order is in the $node variable and you could go as follows;

$node-&gt;field_name = $calculated_value;
node_save($node);