<!DOCTYPE HTML PUBLIC "-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML 4.0//EN" "hmpro6.dtd"> <HTML><% @Language=VBScript %> <HEAD> <TITLE>Fall Enrollment Summary</TITLE> <% '********************************************************************************************* ' Setup ODBC connection to SQL Database '************************************** Dim RowCount Dim TotalArray(7) Dim TableArray(4,5) Dim TRow, TIndc, x, A, B InitVariables(0) TRow = 0 TIndc = 0 x = 0 Set Conn = Server.CreateObject("ADODB.Connection") conn.Open "Student" 'This is the name of the ODBC connection to the SQL server that was specified at the SERVER Set cmd = Server.CreateObject("ADODB.Command") Set cmd.ActiveConnection = Conn adCmdStoredProc = 4 SemesterCodes = Request("SemesterCodes")' 199900FA200001FA CurrentYear = Mid(SemesterCodes,9,4) BuildTable() '********************************************************************************************* %> <!--#include file ="../HeaderFBLevel1.htm" --> <%'<!--#include file ="../HeaderFBLevel1.htm" -->%> </HEAD> <BODY TEXT="#000000" bgcolor="FFFFFF"><br> <TABLE WIDTH="600" ALIGN="center" BORDER="0"> <TR> <TD> <TABLE WIDTH="70%" ALIGN="center" BORDER="0" CELLPADDING="0" CELLSPACING="0"> <TR> <TD COLSPAN="5" ALIGN="middle" HEIGHT="45"><FONT SIZE="4"><b> <%'This is for the header of the page%> Fall Enrollment Summary<BR><%=Mid(SemesterCodes,9,4)%> and <%=Left(SemesterCodes,4)%><BR><br> </td> </tr> <TR> <TD width="55%" ALIGN="left" HEIGHT="25" VALIGN="bottom" colspan="2">&nbsp;</TD> <TD width="15%" ALIGN="middle" HEIGHT="25" VALIGN="bottom" ><B>&nbsp;</B></TD> <TD width="15%" ALIGN="middle" HEIGHT="25" VALIGN="bottom" ><B>&nbsp;</B></TD> <TD width="15%" ALIGN="middle" HEIGHT="25" VALIGN="bottom" ><B>&nbsp;</B></TD> </TR> <TR VALIGN="bottom"> <TD width="55%" ALIGN="left" HEIGHT="15" VALIGN="bottom" colspan="2"> <b>&nbsp;</b> </TD> <TD width="15%" ALIGN="right" HEIGHT="15" VALIGN="bottom" ><B><%=Mid(SemesterCodes,9,4)%>&nbsp;</B></TD> <TD width="15%" ALIGN="right" HEIGHT="15" VALIGN="bottom" ><B><%=Left(SemesterCodes,4)%>&nbsp;</B></TD> <TD width="15%" ALIGN="right" HEIGHT="15" VALIGN="bottom" ><B>Change</B></TD> </TR> <TR> <TD COLSPAN="10"><HR></TD> </TR> <%for RowCount = 0 to 4%> <% ' Loop 1 - Begin loop to build tables %> <tr> <TD COLSPAN="2" width="52%"> <%select case RowCount%> <%case "0"%> <A href="EnrollmentSummary2YearsDetail.asp?LocationCode=U&SemesterCodes=<%=Request("SemesterCodes")%> &View=<%=("View"+Left(SemesterCodes,4)+Mid(SemesterCodes,9,4)+"Enrl")%>">University Park</a> <% case "1" %> <A href="EnrollmentSummary2YearsDetail.asp?LocationCode=C&SemesterCodes=<%=Request("SemesterCodes")%> &View=<%=("View"+Left(SemesterCodes,4)+Mid(SemesterCodes,9,4)+"Enrl")%>">Campus Locations</a> <% case "2" %> <A href="EnrollmentSummary2YearsDetail.asp?LocationCode=M&SemesterCodes=<%=Request("SemesterCodes")%> &View=<%=("View"+Left(SemesterCodes,4)+Mid(SemesterCodes,9,4)+"Enrl")%>">College of Medicine</a> <% case "3" %> Dickinson School of Law <% case "4" %> PA College of Technology <%end select %> </TD> <%for subscript = 0 to 1%> <%'loop 2 - check data for blank, replace with zeros %> <TD width="15%" ALIGN="right"> <%=checkblank(TableArray(RowCount,subscript),subscript,x)%> </TD> <%next%> 'loop 2 - loop through check for blanks <TD ALIGN="right" width="16%"> <%=FormatNumber((TableArray(RowCount,0)- TableArray(RowCount,1)),0,,-1)%> </td> </TR> <%next%> <%'loop 1 - loop through building tables %> <TR> <TD COLSPAN="9"><HR></TD> </TR> <TR> <TD BGCOLOR="#c8c8c8" COLSPAN="2" width="52%"><B>Total</B></TD> <%for subscript = 0 to 1%> <%'loop3 - format numbers %> <TD width="15%" ALIGN="right" BGCOLOR="#c8c8c8"><B> <%=formatnumber(TotalArray(subscript),0)%> </td> <%next%> <% 'loop3 - format numbers %> <TD ALIGN="right" BGCOLOR="#c8c8c8" width="16%"> <b><%=FormatNumber((TotalArray(0)- TotalArray(1)),0,,-1)%></b> </td> </TR> <TR> <TD COLSPAN="9" HEIGHT="55"><STRONG>&nbsp;</STRONG></TD> </TR> </TBODY> </TABLE> <Table BORDER="0" WIDTH="70%" CELLSPACING="0" CELLPADDING="0" ALIGN="center"> <TR> <TD VALIGN="bottom" ALIGN="right"> <A href="StudentTableOfContents<%=CurrentYear%>.asp" >Table of Contents</A> </TD> </TR> </TABLE> </TD> </TR> </TABLE> <!--#include file ="../FooterFactBook.htm" --> <%'<!--#include file ="../FooterFactBook.htm" -->%> <%Conn.Close 'close ODBC connection Set conn = nothing%> </BODY> </HTML> <%' ---------------------------------------------------------------------------------------------------------------> 'Function Section '-------------------------------------------------------------------------------------------------------------> public function BuildTable() 'This function gets the data used in the HTML tables below 'Following code is for first call to SQL Server to execute stored procedure cmd.CommandType = adCmdStoredProc 'States that it is a stored procedure cmd.CommandText = "SPEnrollByCampusCollege2YearsSummary" 'name of the stored procedure to execute cmd.Parameters("@CurrYear") = Mid(SemesterCodes,9,8) cmd.Parameters("@PrevYear") = Left(SemesterCodes,8) cmd.Parameters("@ViewName") = "View"+Left(SemesterCodes,4)+Mid(SemesterCodes,9,4)+"EnrlSummary" set RS = cmd.Execute 'Execute stored procedure and store it in variable called rs xcount = 0 for count = 0 to 3 set RS = RS.nextrecordset for y = 0 to 1 TableArray(xcount,y) = RS(y) next 'for y = 0 to 2 if Left(SemesterCodes,4)= "1999" then TableArray(4,0)=5323 'PCT numbers TableArray(4,1)=5388 else TableArray(4,0)=5538 TableArray(4,1)=5323 end if if count <> 3 then set RS = RS.nextrecordset else RS.close set RS = nothing end if xcount=xcount+1 next 'for count = 0 to 3 end function '--------------------------------------------------------------------------------------------------- public function InitVariables(value) 'initialize TotalArray for subscript = 0 to 4 TotalArray(subscript) = value next end function '------------------------------------------------------------------------------------------------- public function CheckBlank(value,subscript,WhichRaw) 'Format data if blank or if a number, add to TotalArray if value > " " then checkblank = formatnumber(value,0) TotalArray(subscript) = TotalArray(subscript) + formatnumber(value,0) else checkblank = " " TotalArray(subscript) = TotalArray(subscript) + 0 end if end function '-------------------------------------------------------------------------------------------------- %>