Dear Sir,
In my develpment i am getting stuck for a senario.Kindly please help me for it.
Everytime we give the request we get the response of 8 records and
its corresponding value.
Then next button will display more and more records if it is availbale in data base.
I am attachcing the screen shoot of my problem
CMP is a column in the this record.
i want to calculate all the CMP value which displyed in total pages
and its value will populate in Total =<%TotalCMP%>
Let say in the first page i get 8 records then .Then CMP value in the
page1total=200+100+20+1+1+1+1+1
page2total=page1total+(8 filed data of page 2 in cmp)
if page is the final page of record
then page3finalcmptotal=page1total+page2total+(8 filed data of page 2 in cmp)
Total will papulate Total CMP =<%TotalCMP%> (PAGE NO ARE DYMANIC)
Please look my code and guide me how i will display Total CMP Value.
For(int iCount=0;iCount < iNoOfRec;iCount++ )
{
%>
<TR >
<%
if (iCount==0)
{
%>
<TD align ="right"><INPUT TYPE="radio" id ="selOption" NAME="selOption" VALUE="<%=iCount%>" ONFOCUS="activateFields('<%=iCount%>');" CHECKED > </TD>
<%
}
else
{
%>
<TD align ="right"><INPUT TYPE="radio" id ="selOption" NAME="selOption" VALUE="<%=iCount%>" ONFOCUS="activateFields('<%=iCount%>');"> </TD>
<%
}//else closes
if (dbflag==0)
{
inVec= (Vector) vData.elementAt(iCount);
%>
<TD align ="right"><INPUT TYPE="text" maxlength ="30" size="30" NAME="Symbol<%=iCount%>" class = "textDataCell" DISABLED VALUE="<%=(String) inVec.elementAt(0)%>">
<TD align ="right"><INPUT TYPE="text" maxlength ="12" size="12" NAME="ISIN<%=iCount%>" class = "textNumericCell" DISABLED VALUE="<%=(String) inVec.elementAt(1)%>"></TD>
<TD align ="right"><INPUT TYPE="text" maxlength ="6" size="6" NAME="FB<%=iCount%>" class = "textNumericCell" DISABLED VALUE="<%=(String) inVec.elementAt(2)%>"></TD>
<TD align ="right"><INPUT TYPE="text" maxlength ="6" size="6" NAME="CMP<%=iCount%>" class = "textNumericCell" DISABLED VALUE="<%=(String) inVec.elementAt(3)%>">
<TD align ="right"><INPUT TYPE="text" maxlength ="6" size="6" NAME="CMV<%=iCount%>" class = "textNumericCell" DISABLED VALUE="<%=(String) inVec.elementAt(4)%>"></TD>
<TD align ="right"><INPUT TYPE="text" maxlength ="6" size="6" NAME="UP<%=iCount%>" class = "textNumericCell" DISABLED VALUE="<%=(String) inVec.elementAt(5)%>">
<TD align ="right"><INPUT TYPE="text" maxlength ="6" size="6" NAME="OH<%=iCount%>" class = "textNumericCell" DISABLED VALUE="<%=(String) inVec.elementAt(6)%>"></TD>
<TD align ="right"><INPUT TYPE="text" maxlength ="6" size="6" NAME="AvlQtyForHold<%=iCount%>" class = "textNumericCell" DISABLED VALUE="<%=Float.parseFloat((String)inVec.elementAt (2))-Float.parseFloat((String)inVec.elementAt(3))-Float.parseFloat((String)inVec.elementAt(4))%>"></TD>
<TD align ="right"><INPUT TYPE="text" maxlength ="6" size="6" NAME="QtyForHold<%=iCount%>" onkeypress="return numbersonly()" onKeyDown="return validateOnKeyDown()" onBlur="validateNumber(this.value,this,'Quantity') " class = "textNumericCell"></TD>
<INPUT TYPE="hidden" NAME="Agency<%=iCount%>" VALUE="E"></TD>
if(sCurPageNo.equals(sTotPageNo))
{
%>
<tr>
<td><td><td><B>Total CMP Value</B></td>
<td<input size="6" type="text" DISABLED VALUE="xyz"></td>
</td></td></td>
</tr>
<% }%>
Thanks a lot in Advance.
Please guide me for the needful.