A
aarthy
Hi,
I have a problem in the display of the ASP screen actually i am
retrieving and displaying the data from a database when the view button
is hit.The contents for display is so long so i want to have a previous,
next link on that page so that some 100 records are displayed in each
page.Pls help me.
Thanks for your reply.
I am attaching my code here please help me where can i make the change
to split the display of my page.
This is for entering the couriers that is received in an company. Here
fd=from date fm=from month td=to date tm=to month fy=from year ty=to
year rpt=report and this program displays the details of the courier
received on the basis of the input fdate-from date and tdate-todate will
be displayed.
Please help me
<%@ LANGUAGE="VBSCRIPT" %>
<SCRIPT language="javascript">
function CClr(oCmp, Num)
{
if(Num == 1)
oCmp.style.backgroundColor = "#FFFFBF"
else
oCmp.style.backgroundColor = "#FFFFFF"
}
</SCRIPT>
<html>
<title>Courier</title>
<body>
<%
dim fd,fm,fy
dim td,tm,ty
dim rpt,stxt
dim fdate, tdate
dim branch
dim toatalrec
fd=Request.QueryString("fd")
fm=Request.QueryString("fm")
fy=Request.QueryString("fy")
branch=Request.QueryString("branch")
fdate=fm+"/"+fd+"/"+fy
td=Request.QueryString("td")
tm=Request.QueryString("tm")
ty=Request.QueryString("ty")
tdate=tm+"/"+td+"/"+ty
stxt =Request.QueryString("stxt")
number=Request.QueryString("number")
rpt="N"
dim cn, rs
set cn = Server.Createobject("ADODB.Connection")
set rs = Server.Createobject("ADODB.Recordset")
//cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=mmpl;Data Source=mailserver", "it","it"
cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=mmpl;Data Source=magnaserver",
"it","it"
if stxt=VbnullString then
if branch="ALL" then
rs.Open "select * from mmpl_in_trans where rpt_date>='" & fdate & "'
and rpt_date<='" & tdate &"'", cn
else
rs.Open "select * from mmpl_in_trans where rpt_date>='" & fdate & "'
and rpt_date<='" & tdate &"' and in_fn='" & branch &"'", cn
end if
Response.Write("<Font Face='Arial Unicode MS'><B>INWARD ENTRY <a
href='eml_in.asp'>Back</a> <a href='..\mmplinout.asp'>Home
Page</a></br>")
Response.Write ("<Font Face='Arial Unicode MS'><B>From : " & fdate & "
to : " & tdate &" </br>")
rpt="Y"
else
rs.Open "select * from mmpl_in_trans where in_details like '%" & stxt &
"%' order by in_fn", cn
Response.Write("<Font Face='Arial Unicode MS'><B>INWARD ENTRY</B> <a
href='eml_in.asp'>Back</a> <a href='..\mmplinout.asp'>Home
Page</a></br>")
Response.Write ("<Font Face='Arial Unicode MS'><B>Searched for : " &
stxt &"</br>")
rpt="Y"
end if
if rpt="Y" then
Response.Write("<table border=0 > ")
Response.Write("<tr colspan=0 onblur='CClr(this, 2)'
onfocus='CClr(this, 1)'><th bgcolor=orange><Font Face='Arial Unicode MS'
size=2>DOCDT </Font></th>")
Response.Write("<th height=5 bgcolor=orange><Font Face='Arial Unicode
MS' size=2> BRANCH </Font></th>")
Response.Write("<th bgcolor=orange><Font Face='Arial Unicode MS'
size=2>DEPT </Font></th>")
Response.Write("<th bgcolor=orange><Font Face='Arial Unicode MS'
size=2>DETAILS </Font></th>")
Response.Write("<th bgcolor=orange><Font Face='Arial Unicode MS'
size=2>COU NO </Font></th>")
Response.Write("<th bgcolor=orange><Font Face='Arial Unicode MS'
size=2>COU DATE </Font></th>")
Response.Write("<th bgcolor=orange nowrap ><Font Face='Arial Unicode
MS' size=2> REC TIME </Font></th>")
Response.Write("</tr><tr>")
if Rs.EOF=False then
Rs.MoveFirst()
With Rs
Response.Write("<td align=Center bgcolor='#A4D867'><Font face='Arial
Unicode MS' size=2 >" & .Fields("IN_DATE") &"</Font></td>")
Response.Write("<td align=Center bgcolor='#A4D867'><Font face='Arial
Unicode MS' size=2 >"+.Fields("IN_FN")+"</Font></td>")
Response.Write("<td align=Center bgcolor='#A4D867'><Font face='Arial
Unicode MS' size=2 >"+.Fields("IN_DP")+"</Font></td>")
Response.Write("<td bgcolor='#A4D867'><Font face='Arial Unicode MS'
size=2 >"+.Fields("IN_DETAILS")+"</Font></td>")
Response.Write("<td align=Center bgcolor='#A4D867'><Font face='Arial
Unicode MS' size=2 >"+.Fields("IN_CRNO")+"</Font></td>")
Response.Write("<td align=Center bgcolor='#A4D867'><Font face='Arial
Unicode MS' size=2 >"&.Fields("IN_CRDATE")&"</Font></td>")
Response.Write("<td align=Center bgcolor='#A4D867'><Font face='Arial
Unicode MS' size=2 >"+.Fields("ENT_TIME")+"</Font></td>")
Response.Write("<tr>")
Rs.MoveNext()
End with
next
End if
End if
%>
</table>
<input type="Submit" name="submitted" value="Next">
</Font></pre></font><form>
</BODY>
</HEAD>
</HTML>
Thanks,
Aarthy
I have a problem in the display of the ASP screen actually i am
retrieving and displaying the data from a database when the view button
is hit.The contents for display is so long so i want to have a previous,
next link on that page so that some 100 records are displayed in each
page.Pls help me.
Thanks for your reply.
I am attaching my code here please help me where can i make the change
to split the display of my page.
This is for entering the couriers that is received in an company. Here
fd=from date fm=from month td=to date tm=to month fy=from year ty=to
year rpt=report and this program displays the details of the courier
received on the basis of the input fdate-from date and tdate-todate will
be displayed.
Please help me
<%@ LANGUAGE="VBSCRIPT" %>
<SCRIPT language="javascript">
function CClr(oCmp, Num)
{
if(Num == 1)
oCmp.style.backgroundColor = "#FFFFBF"
else
oCmp.style.backgroundColor = "#FFFFFF"
}
</SCRIPT>
<html>
<title>Courier</title>
<body>
<%
dim fd,fm,fy
dim td,tm,ty
dim rpt,stxt
dim fdate, tdate
dim branch
dim toatalrec
fd=Request.QueryString("fd")
fm=Request.QueryString("fm")
fy=Request.QueryString("fy")
branch=Request.QueryString("branch")
fdate=fm+"/"+fd+"/"+fy
td=Request.QueryString("td")
tm=Request.QueryString("tm")
ty=Request.QueryString("ty")
tdate=tm+"/"+td+"/"+ty
stxt =Request.QueryString("stxt")
number=Request.QueryString("number")
rpt="N"
dim cn, rs
set cn = Server.Createobject("ADODB.Connection")
set rs = Server.Createobject("ADODB.Recordset")
//cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=mmpl;Data Source=mailserver", "it","it"
cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=mmpl;Data Source=magnaserver",
"it","it"
if stxt=VbnullString then
if branch="ALL" then
rs.Open "select * from mmpl_in_trans where rpt_date>='" & fdate & "'
and rpt_date<='" & tdate &"'", cn
else
rs.Open "select * from mmpl_in_trans where rpt_date>='" & fdate & "'
and rpt_date<='" & tdate &"' and in_fn='" & branch &"'", cn
end if
Response.Write("<Font Face='Arial Unicode MS'><B>INWARD ENTRY <a
href='eml_in.asp'>Back</a> <a href='..\mmplinout.asp'>Home
Page</a></br>")
Response.Write ("<Font Face='Arial Unicode MS'><B>From : " & fdate & "
to : " & tdate &" </br>")
rpt="Y"
else
rs.Open "select * from mmpl_in_trans where in_details like '%" & stxt &
"%' order by in_fn", cn
Response.Write("<Font Face='Arial Unicode MS'><B>INWARD ENTRY</B> <a
href='eml_in.asp'>Back</a> <a href='..\mmplinout.asp'>Home
Page</a></br>")
Response.Write ("<Font Face='Arial Unicode MS'><B>Searched for : " &
stxt &"</br>")
rpt="Y"
end if
if rpt="Y" then
Response.Write("<table border=0 > ")
Response.Write("<tr colspan=0 onblur='CClr(this, 2)'
onfocus='CClr(this, 1)'><th bgcolor=orange><Font Face='Arial Unicode MS'
size=2>DOCDT </Font></th>")
Response.Write("<th height=5 bgcolor=orange><Font Face='Arial Unicode
MS' size=2> BRANCH </Font></th>")
Response.Write("<th bgcolor=orange><Font Face='Arial Unicode MS'
size=2>DEPT </Font></th>")
Response.Write("<th bgcolor=orange><Font Face='Arial Unicode MS'
size=2>DETAILS </Font></th>")
Response.Write("<th bgcolor=orange><Font Face='Arial Unicode MS'
size=2>COU NO </Font></th>")
Response.Write("<th bgcolor=orange><Font Face='Arial Unicode MS'
size=2>COU DATE </Font></th>")
Response.Write("<th bgcolor=orange nowrap ><Font Face='Arial Unicode
MS' size=2> REC TIME </Font></th>")
Response.Write("</tr><tr>")
if Rs.EOF=False then
Rs.MoveFirst()
With Rs
Response.Write("<td align=Center bgcolor='#A4D867'><Font face='Arial
Unicode MS' size=2 >" & .Fields("IN_DATE") &"</Font></td>")
Response.Write("<td align=Center bgcolor='#A4D867'><Font face='Arial
Unicode MS' size=2 >"+.Fields("IN_FN")+"</Font></td>")
Response.Write("<td align=Center bgcolor='#A4D867'><Font face='Arial
Unicode MS' size=2 >"+.Fields("IN_DP")+"</Font></td>")
Response.Write("<td bgcolor='#A4D867'><Font face='Arial Unicode MS'
size=2 >"+.Fields("IN_DETAILS")+"</Font></td>")
Response.Write("<td align=Center bgcolor='#A4D867'><Font face='Arial
Unicode MS' size=2 >"+.Fields("IN_CRNO")+"</Font></td>")
Response.Write("<td align=Center bgcolor='#A4D867'><Font face='Arial
Unicode MS' size=2 >"&.Fields("IN_CRDATE")&"</Font></td>")
Response.Write("<td align=Center bgcolor='#A4D867'><Font face='Arial
Unicode MS' size=2 >"+.Fields("ENT_TIME")+"</Font></td>")
Response.Write("<tr>")
Rs.MoveNext()
End with
next
End if
End if
%>
</table>
<input type="Submit" name="submitted" value="Next">
</Font></pre></font><form>
</BODY>
</HEAD>
</HTML>
Thanks,
Aarthy