<%
If Not IsEmpty(Request("tstatus")) Then
strTStatus = Trim(Request("tstatus"))
Else
strTStatus = "filter"
End If
Dim rptType
'Response.Write request("rpt_output") & "<BR>"
if request("rpt_output") = "Web" then
rptType = "Web"
end if
if request("rpt_output") = "Excel" then
rptType = "Excel"
response.contentType = "application/vnd.ms-excel"
end if
Session("odv_wtext") = ""
Session("odv_displayview") = "list"
Session("odv_displayequipment_charges") = ""%>
<% Response.Write "<FORM ACTION=dm_ar_dsAction.asp METHOD=""POST"">" %>
<table WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BORDER="0">
<tr>
<th WIDTH="5%" ROWSPAN="2" VALIGN="top"><img SRC="images/noback.gif" ALT="Do Not Use Your Browser Back Button While Using This Application." BORDER="0"></th>
<th NOWRAP BGCOLOR="#6633FF" ALIGN="Left">
<%
If strTStatus = "query" Then
Response.write "<FONT SIZE=6> Discrepancy Summary Listing Search Results</FONT>"
Else
Response.write "<FONT SIZE=6> Search Discrepancy Summary Listing</FONT>"
End if
%>
</th>
</tr>
<tr>
<td NOWRAP BGCOLOR="#6633FF" VALIGN="top" ALIGN="Right" WIDTH="100%">
<%End If%>
<%If strTStatus = "query" Then
Response.write " <INPUT TYPE='HIDDEN' NAME='page' VALUE='" & strTStatus & "'> "
Response.write " <INPUT TYPE='SUBMIT' NAME='DataAction' VALUE='New Search'> "
End if
Response.write " <INPUT TYPE='SUBMIT' NAME='DataAction' VALUE='AC Menu'> "
%>
</td>
</tr>
</table>
</form>
<%
Select Case strTStatus
Case "filter" %>
<h4 ALIGN="center">Discrepancy Summary Listing by Budget Center</h4>
<font SIZE="2" COLOR="navy"><strong>Enter Search Criteria and Click the Begin Search button.</strong></font>
<!--<form ACTION="dm_ar_ds_rpt.asp?rptType=<%=rpt_out%>" METHOD="POST">-->
<form ACTION="dm_ar_ds.asp" METHOD="POST" id=form1 name=form1>
<table WIDTH="100%" CELLSPACING="2" CELLPADDING="1" BORDER="0">
<tr>
<%
'START-Discrepancy Type Lookup------------------------------------------------
Dim qry_type
set conn = Session("DBConn")
tsql = "SELECT DISTINCT type, type FROM tblDiscrepancySummary ORDER BY type"
Set rsqry_type = Conn.Execute(tsql)
' Response.Write tsql
qry_type = Null
On Error Resume Next
qry_type = rsqry_type.GetRows()
set rsqry_type = Nothing
%>
<td WIDTH="15%"><strong>Discrepancy Type:</strong></td>
<td WIDTH="85%"><select NAME="tType" SIZE="1">
<option SELECTED VALUE></option>
<% ' Loop thru the rows in the array
Do
If isnull(UBound(qry_type, 2)) then
Response.Write "</SELECT>"
Exit Do
End If
For intRow = 0 to UBound(qry_type, 2)
Response.Write "<OPTION VALUE=" & QuotedString(qry_type(0, intRow))
Response.Write ">"
Response.Write ConvertNull(qry_type(1, intRow)) & " "
Response.Write "</OPTION>"
Next
Response.Write "</SELECT>"
Exit Do
Loop
'END-Discrepancy Type Lookup------------------------------------------------
%>
</td>
</tr>
<tr>
<td COLSPAN="2"></td>
</tr>
<%
'START-Date Lookup------------------------------------------------
Dim qry_date
set conn = Session("DBConn")
tsql = "SELECT DISTINCT rollup_date, rollup_date FROM tblDiscrepancySummary ORDER BY rollup_date desc "
Set rsqry_date = Conn.Execute(tsql)
' Response.Write tsql
qry_date = Null
On Error Resume Next
qry_date = rsqry_date.GetRows()
set rsqry_date = Nothing
%>
<td WIDTH="15%"><strong>Date:</strong></td>
<td WIDTH="85%"><select NAME="tDate" SIZE="1">
<option SELECTED VALUE></option>
<% ' Loop thru the rows in the array
Do
If isnull(UBound(qry_date, 2)) then
Response.Write "</SELECT>"
Exit Do
End If
For intRow = 0 to UBound(qry_date, 2)
if dateadd("yyyy", 1, ConvertNull(qry_date(1, intRow))) > date() then
Response.Write "<OPTION VALUE=" & QuotedString(qry_date(0, intRow))
Response.Write ">"
Response.Write ConvertNull(qry_date(1, intRow)) & " "
Response.Write "</OPTION>"
end if
Next
Response.Write "</SELECT>"
Exit Do
Loop
'END-Date Lookup------------------------------------------------
%>
</td>
</tr>
<td WIDTH="15%"><strong>Output:</strong></td>
<td width="85%"><input type="radio" name="rpt_output" value="Web" checked>Web
<br><input type="radio" name="rpt_output" value="Excel">Excel</td>
<%
rpt_out = request("rpt_output")
%>
</table>
<br>
<em>Select a specific Discrepancy Type, Date and Output prior to clicking the
Begin Search button.
</em>
<br><br>
<input TYPE="Hidden" NAME="tstatus" VALUE="query">
<input TYPE="SUBMIT" NAME="runquery" VALUE="Begin Search">
<input TYPE="RESET" NAME="clearcriteria" VALUE="Reset Screen">
</form>
<%Case "query"%>
<!-- Start Financial Summary Section ---------------------------------------------------------->
<table WIDTH="100%" CELLSPACING="0" CELLPADDING="2" BORDER="0">
<%
set conn = Session("DBConn")