A single SQL statement actually gives you all the information to create a full-fledged web portlet for a simple table report:
(1) Number of rows.
(2) Number of columns
(3) Column names
Based on XSLT and JSP, I created a table report portlet template based on a single SQL statement.
This is a simple SQL statement running on MySql:

This is a simple table report portlet built within 5 minutes on the template:

This is the xslt style sheet which is built automatically by the template sysytem. You can do further modification for your own need.
Firmi prego dentro per inbandierare questo come inadeguato.