Using the normal detail band and columnHeader band this is achieved by creating a variable with calculationType="sum" on the field you like to sum
See:
How to sum all values in a column in Jaspersoft iReport Designer?
Then display the variable using a textField in the columnHeader band, setting evaluationTime="Report" so that variable is calculated before displaying it.
To rotate a textElement vertical use the rotation attribute (rotation="Left")
Example:
Result (with some arbitrary data)