[dba-SQLServer] Reporting in ASP.NET WITHOUT SSRS or Crystal

Steve Erbach erbachs at gmail.com
Fri Feb 10 09:06:44 CST 2012


I've done similar stuff with SQL Server code to generate a dynamic web
page. I was hoping for something a bit more packaged. You're right, there's
more control your way, but...

I'm going to download the NorthWind.NET project and compare its report
generation parts to what you posted, though.  Thank you!


Steve Erbach
Neenah, WI

On Thu, Feb 9, 2012 at 7:38 PM, Stuart McLachlan <stuart at lexacorp.com.pg>wrote:

> I generate a lot of web pages from Access/SQL etc data.  I simply build
> the output page with
> strings.  I find it gives me much better control over the result.
> Here's a typical function:
> Function CreateWebPage(PageName) As Boolean
> Dim rs As DAO.Recordset
> Dim rs2 As DAO.Recordset
> Dim strFile As String
> Dim strtemp As String
> Dim strPagename As String
> Dim lngGalleryCount As Long
> Dim ff As Long
> Dim ff2 As Long
> strFile = TempDir() & PageName
> ff = FreeFile
> Open strFile For Output As #ff
> ff2 = FreeFile
> Open BEDir() & "\HeaderTemplate.txt" For Input As #ff2
> Do While Not EOF(ff2)
>  Line Input #ff2, strtemp
>  If InStr(strtemp, "HEADLINEGOESHERE") > 0 Then
>     strtemp = Replace(strtemp, "HEADLINEGOESHERE",
> DLookup("WebPageheadline", "tblWebPages", "WebPageName = '" & PageName &
> "'"))
>  End If

More information about the dba-SQLServer mailing list