Format SQL Output
===

I need to make my output readable. I have succeeded in doing so, for queries that I write directly.

i) I need to do the same for queries that involve a cursor, i.e. to be specific, I need the records, returned by a cursor to be formatted as well. But I am unable to do. 

ii) I instead explicitly print the column names, and the print the records. Still, the same. Is there any way, I could retrieve the headers as well, and then based on their length, format the received records as well?