SQL to html, xls, graph and pdf