format the result using the format options in render_result method