ASP
Old-School ASP. Don't expect to see much new stuff here, but if you are still using ASP there's a handy "ReportClass" that you may find useful.
Jumping back a bit, I thought I'd also post a bit of code for those still using good old ASP and/or ADO. This is a function writen in VBScript that works much in the same way as the GetRows() method of an ADO recordset -- it returns the entire contents of the recordset in a 2-dimensional array. The difference with this one, of course, is that it will also do a pivot for you.
As promised, here's a sample ASP report from Northwind using my ASP Report Class (http://weblogs.sqlteam.com/jeffs/posts/526.aspx).
Hopefully, everyone will agree that the script is very easy to write and read and much shorter. All grouping (for both headers and footers), subtotals and running totals are completely taken care of by using the class, and it is giving you recordset functionality (movenext and EOF and column reference by name) using the speedy GetRows() method under the hood.
For this to work, you must have the class saved as “ReportClass.asp“ in the same folder as this script (notice the include).
<%@ Language=VBScript %>
<%Option Explicit%>
<%@ Language=VBScript %>
If you use ASP, ADO and SQL Server, check out my new article. It includes code for a VBScript class which makes writing HTML reports based on an ADO recordset with group headers, footers, and subtotals extremely easy.
read more...