zami
12-12-2010, 01:35 PM
hi everyone
i want to display data on my web page, on behalf of some selections, from different databases, when i select generate report its give me error msg,
initially 2 tables are showing data, code school gender, (gend-id, gend-Type both text values)and code school lever,(Lev-id, Lev-Type, text property)
please someone help as early as possible. thanks
here are the codes of file
thanks
azmi
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Reform Support Unit - RSU</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
//-->
</script>
<link href="rsustyle.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="JavaScript" src="flipmenu.js">
/***********************************************
* Developed
***********************************************/
</script>
<script language="javascript" src="ts_files/scroll.js"></script>
<style type="text/css">
<!--
.style34 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; }
.style35 {
font-size: 12px;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style40 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12; }
.style41 {font-size: 12}
.style42 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
-->
</style>
</head>
<%
m_item = Request.QueryString("mitem")
RF_Dist = Request.Form("cmbDistrict")
RF_Teh = Request.Form("cmbTaluka")
Set conn =Server.CreateObject("adodb.connection")
Dim strDBPath
strDBPath = Server.MapPath("database/SEMISdatabase.mdb")
dim strConnectionString
strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";"
conn.Open strConnectionString
sqldistrict = "select = districtid,district from district order by districtid"
Set RSDist = conn.Execute(sqldistrict)
if RSDist.eof then
Response.write("No district in database ...")
Response.End
end if
if isNull(RS_Dist) or isEmpty(RF_Dist) or RF_Dist = "" then
if not RSDist.eof then
RF_DIst = RSDIST(0)
end if
end if
sqltehsil = "select tehsilid,tehsil from Tehsil where DistrictID ='"&RF_Dist&"' order by tehsilid"
Set RSteh = conn.Execute(sqltehsil)
if isNull(RS_Teh) or isEmpty(RF_Teh) or RF_Teh = "" then
if not RSTeh.eof then
RF_Teh = RSTeh(0)
end if
end if
%>
<body>
<div align="center"><img src="image/RSU Header.JPG" width="799" height="136" /><br />
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" colspan="3"><table width="556" border="0" align="right" class="Heading">
<tr>
<td width="54"><div align="center"><a href="RSU-Sindh.html">Home</a></div></td>
<td width="86"><div align="center"><a href="aboutus.html">About Us</a></div></td>
<td width="100"><div align="center"><a href="contactus1.html">Contact Us</a></div></td>
<td width="80"><div align="center">Calendar</div></td>
<td width="111"><div align="center"><a href="departments.html">Departments</a></div></td>
<td width="133"> </td>
</tr>
</table></td>
</tr>
</table>
<br />
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr><td colspan="3" ><form method="post" name="da" id="da" action="dbReportDisplay.asp" >
<table width="456" border="0" bgcolor="#CCCCCC" align="center">
<tr>
<td colspan="3"><div align="center"><span class="style35">Please select the following options for Generate Reports </span></div></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="style42"><span class="style40">Select Type of Report</span></td>
<td>:</td>
<td><div align="left">
<select name="cmbReportType">
<option value="0" selected="selected">Please Select...</option>
<option value="1">Schools Reports</option>
<option value="2">Enrolment Reports</option>
<option value="3">Teachers Reports</option>
<option value="4">Infra-Structre Reports</option>
<option value="5">Summary Reports</option>
</select>
</div></td>
</tr>
<tr>
<td class="style42"><span class="style40">Select Report</span></td>
<td>:</td>
<td><div align="left">
<select name="cmbReports">
<option value="0" selected="selected">Please Select...</option>
<option value="1">Schools by level and gender</option>
<option value="2">Schools by status level and gender</option>
</select>
</div></td>
</tr>
<tr>
<td class="style42"><span class="style40">Select District </span></td>
<td>:</td>
<td><div align="left">
<select id="cmbDistrict" name="cmbDistrict" onchange="da.action='semismain.asp?mitem=1';da.submit()">
<%If Not RSDist.EOF then
RSDist.MoveFirst
do while not RSDist.EOF
If RSDist(0) = RF_Dist then%>
<option selected="selected" value="<%=RSDist(0)%>"><%=RSDist(1)%></option>
<%Else%>
<option value="<%=RSDist(0)%>"><%=RSDist(1)%></option>
<%End if
RSDist.movenext
loop
End if %>
</select>
</div></td>
</tr>
<tr>
<td class="style42"><span class="style40">Select Taluka </span></td>
<td>:</td>
<td><div align="left"><span class="style34">
<select id="cmbTaluka" name="cmbTaluka" onchange="da.action='semismain.asp?mitem=2';da.submit()">
<%
If Not RSTeh.EOF then
RSTeh.MoveFirst
do while not RSTeh.EOF
If RSTeh(0) = RF_Teh then%>
<option selected="selected" value="<%=RSTeh(0)%>"><%=RSTeh(1)%></option>
<%Else%>
<option value="<%=RSTeh(0)%>"><%=RSTeh(1)%></option>
<%End if
RSTeh.movenext
loop
End if%>
</select>
</span></div></td>
</tr>
<tr>
<td width="141"><span class="style41"></span></td>
<td width="3"> </td>
<td width="298"><div align="left">
<input type="submit" name="Submit" value="Generate Report" />
</div></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><label></label></td>
</tr>
<tr>
<td colspan="3"><div align="left" class="style42">Please select district for district reports and taluka for taluka reports of district, for provincial reports select only report type and report </div></td>
</tr>
</table>
<label><br />
</label>
<label></label>
<label></label>
</form>
</body>
</html>
i want to display data on my web page, on behalf of some selections, from different databases, when i select generate report its give me error msg,
initially 2 tables are showing data, code school gender, (gend-id, gend-Type both text values)and code school lever,(Lev-id, Lev-Type, text property)
please someone help as early as possible. thanks
here are the codes of file
thanks
azmi
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Reform Support Unit - RSU</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
//-->
</script>
<link href="rsustyle.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="JavaScript" src="flipmenu.js">
/***********************************************
* Developed
***********************************************/
</script>
<script language="javascript" src="ts_files/scroll.js"></script>
<style type="text/css">
<!--
.style34 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; }
.style35 {
font-size: 12px;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style40 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12; }
.style41 {font-size: 12}
.style42 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
-->
</style>
</head>
<%
m_item = Request.QueryString("mitem")
RF_Dist = Request.Form("cmbDistrict")
RF_Teh = Request.Form("cmbTaluka")
Set conn =Server.CreateObject("adodb.connection")
Dim strDBPath
strDBPath = Server.MapPath("database/SEMISdatabase.mdb")
dim strConnectionString
strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";"
conn.Open strConnectionString
sqldistrict = "select = districtid,district from district order by districtid"
Set RSDist = conn.Execute(sqldistrict)
if RSDist.eof then
Response.write("No district in database ...")
Response.End
end if
if isNull(RS_Dist) or isEmpty(RF_Dist) or RF_Dist = "" then
if not RSDist.eof then
RF_DIst = RSDIST(0)
end if
end if
sqltehsil = "select tehsilid,tehsil from Tehsil where DistrictID ='"&RF_Dist&"' order by tehsilid"
Set RSteh = conn.Execute(sqltehsil)
if isNull(RS_Teh) or isEmpty(RF_Teh) or RF_Teh = "" then
if not RSTeh.eof then
RF_Teh = RSTeh(0)
end if
end if
%>
<body>
<div align="center"><img src="image/RSU Header.JPG" width="799" height="136" /><br />
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" colspan="3"><table width="556" border="0" align="right" class="Heading">
<tr>
<td width="54"><div align="center"><a href="RSU-Sindh.html">Home</a></div></td>
<td width="86"><div align="center"><a href="aboutus.html">About Us</a></div></td>
<td width="100"><div align="center"><a href="contactus1.html">Contact Us</a></div></td>
<td width="80"><div align="center">Calendar</div></td>
<td width="111"><div align="center"><a href="departments.html">Departments</a></div></td>
<td width="133"> </td>
</tr>
</table></td>
</tr>
</table>
<br />
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr><td colspan="3" ><form method="post" name="da" id="da" action="dbReportDisplay.asp" >
<table width="456" border="0" bgcolor="#CCCCCC" align="center">
<tr>
<td colspan="3"><div align="center"><span class="style35">Please select the following options for Generate Reports </span></div></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="style42"><span class="style40">Select Type of Report</span></td>
<td>:</td>
<td><div align="left">
<select name="cmbReportType">
<option value="0" selected="selected">Please Select...</option>
<option value="1">Schools Reports</option>
<option value="2">Enrolment Reports</option>
<option value="3">Teachers Reports</option>
<option value="4">Infra-Structre Reports</option>
<option value="5">Summary Reports</option>
</select>
</div></td>
</tr>
<tr>
<td class="style42"><span class="style40">Select Report</span></td>
<td>:</td>
<td><div align="left">
<select name="cmbReports">
<option value="0" selected="selected">Please Select...</option>
<option value="1">Schools by level and gender</option>
<option value="2">Schools by status level and gender</option>
</select>
</div></td>
</tr>
<tr>
<td class="style42"><span class="style40">Select District </span></td>
<td>:</td>
<td><div align="left">
<select id="cmbDistrict" name="cmbDistrict" onchange="da.action='semismain.asp?mitem=1';da.submit()">
<%If Not RSDist.EOF then
RSDist.MoveFirst
do while not RSDist.EOF
If RSDist(0) = RF_Dist then%>
<option selected="selected" value="<%=RSDist(0)%>"><%=RSDist(1)%></option>
<%Else%>
<option value="<%=RSDist(0)%>"><%=RSDist(1)%></option>
<%End if
RSDist.movenext
loop
End if %>
</select>
</div></td>
</tr>
<tr>
<td class="style42"><span class="style40">Select Taluka </span></td>
<td>:</td>
<td><div align="left"><span class="style34">
<select id="cmbTaluka" name="cmbTaluka" onchange="da.action='semismain.asp?mitem=2';da.submit()">
<%
If Not RSTeh.EOF then
RSTeh.MoveFirst
do while not RSTeh.EOF
If RSTeh(0) = RF_Teh then%>
<option selected="selected" value="<%=RSTeh(0)%>"><%=RSTeh(1)%></option>
<%Else%>
<option value="<%=RSTeh(0)%>"><%=RSTeh(1)%></option>
<%End if
RSTeh.movenext
loop
End if%>
</select>
</span></div></td>
</tr>
<tr>
<td width="141"><span class="style41"></span></td>
<td width="3"> </td>
<td width="298"><div align="left">
<input type="submit" name="Submit" value="Generate Report" />
</div></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><label></label></td>
</tr>
<tr>
<td colspan="3"><div align="left" class="style42">Please select district for district reports and taluka for taluka reports of district, for provincial reports select only report type and report </div></td>
</tr>
</table>
<label><br />
</label>
<label></label>
<label></label>
</form>
</body>
</html>