hi Hu Po, sorry for the delay in a response to you, i was away.
to center the text vertically you need to use a workaround as there is no property in text (it's been requested many times on Idea Place) to vertically center text objects or formula outputs.
a workaround would involve knowing how many lines are going to be in a group and you know that already with the above mentioned code which is used to form the height of the @Spacer formula...
replicatestring(chr(10), Count ({your fun_name field}, {your group field}))
if you now create a new formula that has syntax like the following you can partially center your output. i mention the word "partially" as this workaround tries to center text using chr(10) as opposed to using a section height.
numbervar v:= floor(Count ({your fun_name field}, {your group field})/2);
if v > 1 then v:= v -1;
replicatestring(chr(10), v) + {the field you want to display}