You are already creating the necessary sub-totals in each of the first three tables (via a group I would guess). In the create scripting event for the table cell with your Grand Total, set a Persistent Global Variable to track each sub-total. You can then access each value inside the fourth and final table.
To set the variable:
var totalValue = this.getDataRowData().getColumnValue("totalColumnName");
reportContext.setPersistentGlbalVariable("DataSet1Total", totalValue.toString());
NOTE: You will need to send the grand total to a "String" type to ensure serialization. You can convert it back to a number when you render the final summary table.
To use the variable, add a Text control to your report (in a cell on the Summary Table). In the onCreate scripting event for the text control enter the following:
this.text = reportContext.getPersistentGlobalVariable("DataSet1Total");
You would do this for each summary field you retained earlier. Then for the Grand total, you can do this:
this.text = parseInt(getPersistentGlobalVariable("DataSet1Total")) + parseInt(getPersistentGlobalVariable("DataSet2Total")) + parseInt(getPersistentGlobalVariable("DataSet3Total"));
A Persistent Global Variable is simply a serializable value that can be accessed across component boundaries inside a report. It can come in very handy for requirements just like yours.
Good Luck!