Hello, again good people.
I am having a major issues.
Please take a look at this link first:
http://keniginc.com/defaultsc.htm
All items on left starting with Bal. From Prev Month are called ActivityType on our db.
All the items on the right, starting with PLA to DOMESTIC, are caseType on our db.
What I want to do is take each row, and get a value for all 5 casetypes, then add the values and stick the total in the TOTAL column in extreme right.
So far, the values are not right.
Take for instance, the following:
ActivityType CaseType Count
1 1 3
1 2 5
1 3 6
1 4 8
1 5 9
The above means that ActivityType here is Bal.From Prev. Month and has a value of 1
CaseTypes are PLA, CASE, SILICA, CIVIL, DOMESTIC, 1,2,3,4,5 respectively.
And PLA has a value of 3 (count)
CASE has a value of 5
SILICA has a value of 6
CIVIL has a value of 8
DOMESTIC has a value of 9
I expected the code snippet below to get these values right and stick them in those input textboxes. Those boxes are either blank or have the wrong values.
Here is my code snippet.
Code:
<TR>
<TD nowrap align="left">Bal. From Prev. Month</TD>
<%
activity = 0
For casetype = 1 TO 5
data = ""
If Not eachRowRS.eof Then
If eachRowRS("activityType") = activity AND eachRowRS("caseType") = casetype Then
data = eachRowRS("count")
eachRowRS.MoveNext
End If
End If
%>
<TD><input size="5" name="count_<%=activity%>_<%=casetype%>" value="<%=data%>"></TD>
<%
Next
%>
<TD><input size=5 name="total_<%=activity%>" READONLY></TD>
</TR>
This is for one row and is supposed to feel all those boxes in the Bal. From Prev Month row.
Any assistance is greatly, appreciated.