?? report.asp
字號:
<td></td>
<!--##
End If
End If
For i = 1 to TABLE.Fields.Count
Set FIELD = TABLE.Fields.Seq(i)
If FIELD.FldList And FIELD.FldGroupBy <= 0 And FIELD.FldGenerate And FIELD.FldHtmlTag <> "FILE" Then
##-->
<td valign="top"<!--##=ewCSSGroupHeader##-->><span class="aspmaker"><!--##=FIELD.FldCaption##--></span></td>
<!--##
End If
Next
##-->
</tr>
<%
Do While Not rsdtl.eof
<!--##
For i = 1 to TABLE.Fields.Count
Set FIELD = TABLE.Fields.Seq(i)
If FIELD.FldList And FIELD.FldGroupBy <= 0 And FIELD.FldGenerate And FIELD.FldHtmlTag <> "FILE" Then
##-->
<!--##=FIELD.FldVar##--> = rsdtl("<!--##=FIELD.FldName##-->")
<!--## If FIELD.FldType = 18 Or FIELD.FldType = 19 Then ##-->
<!--##=FIELD.FldVar##--> = ewConv(<!--##=FIELD.FldVar##-->, <!--##=FIELD.FldType##-->) ' Convert adUnsignedSmallInt/adUnsignedInt
<!--## End If ##-->
<!--##
End If
For j = 0 to nGroups
If FIELD.FldRptAggSum Or FIELD.FldRptAggAvg Then
##-->
s<!--##=FIELD.FldVar##-->(<!--##=j##-->) = s<!--##=FIELD.FldVar##-->(<!--##=j##-->) + <!--##=FIELD.FldVar##-->
<!--##
End If
If FIELD.FldRptAggMin Then
##-->
If n<!--##=FIELD.FldVar##-->(<!--##=j##-->) > <!--##=FIELD.FldVar##--> Then n<!--##=FIELD.FldVar##-->(<!--##=j##-->) = <!--##=FIELD.FldVar##-->
<!--##
End If
If FIELD.FldRptAggMax Then
##-->
If m<!--##=FIELD.FldVar##-->(<!--##=j##-->) < <!--##=FIELD.FldVar##--> Then m<!--##=FIELD.FldVar##-->(<!--##=j##-->) = <!--##=FIELD.FldVar##-->
<!--##
End If
Next
Next
##-->
%>
<!--##
If TABLE.TblRptShowDetails Then
##-->
<tr>
<!--##
If sIndent <> "" Then
For i = 1 to nGroups
##-->
<!--##=sIndent##-->
<!--##
Next
Else
If bAggregate Then
##-->
<td></td>
<!--##
End If
End If
For i = 1 to TABLE.Fields.Count
Set FIELD = TABLE.Fields.Seq(i)
If FIELD.FldList And FIELD.FldGroupBy <= 0 And FIELD.FldGenerate And FIELD.FldHtmlTag <> "FILE" Then
##-->
<td><span class="aspmaker"><!--##=FieldView##--></span></td>
<!--##
End If
Next
##-->
</tr>
<!--##
End If
##-->
<%
rsdtl.movenext
Loop
rsdtl.Close
Set rsdtl = Nothing
<!--##
If nGroups > 0 Then
##-->
' Save Old Group Data
<!--##
For i = 1 to TABLE.Fields.Count
Set FIELD = TABLE.Fields.Seq(i)
If FIELD.FldGroupBy > 0 Then
##-->
grp_<!--##=FIELD.FldVar##--> = <!--##=FIELD.FldVar##-->
<!--##
End If
Next
##-->
' Get Next Record
rs.MoveNext
If rs.Eof Then
nRecCount = 0 ' EOF, Force All Level Breaks
Else
<!--##
For i = 1 to TABLE.Fields.Count
Set FIELD = TABLE.Fields.Seq(i)
If FIELD.FldGroupBy > 0 Then
##-->
<!--##=FIELD.FldVar##--> = rs("<!--##=FIELD.FldName##-->")
<!--## If FIELD.FldType = 18 Or FIELD.FldType = 19 Then ##-->
<!--##=FIELD.FldVar##--> = ewConv(<!--##=FIELD.FldVar##-->, <!--##=FIELD.FldType##-->) ' Convert adUnsignedSmallInt/adUnsignedInt
<!--## End If ##-->
<!--##
End If
Next
##-->
End If
Call ChkLvlBreak()
' Show Footers
<!--##
arrGroups = split(sGroupFldNames,",")
For i = ubound(arrGroups) to 0 Step -1
grpID = i + 1
sTDIndent = ""
If sIndent <> "" Then
For j = 1 to i
sTDIndent = sTDIndent & sIndent
Next
nColSpan = nGroups - i
nColSpanSum = nColSpan + nFlds
Else
nColSpan = 1
If bAggregate Then
nColSpanSum = nFlds + 1
Else
nColSpanSum = nFlds
End If
End If
If nColSpan > 1 Then
sTDSpan = " colspan=" & nColSpan
Else
sTDSpan = ""
End If
If nColSpanSum > 1 Then
sTDSpanSum = " colspan=" & nColSpanSum
Else
sTDSpanSum = ""
End If
Set FIELD = TABLE.Fields(arrGroups(i))
bShowSummary = False ' Show Summary
bAggSum = False ' Aggregate Sum
bAggAvg = False ' Aggregate Average
bAggMin = False ' Aggregate Minimum
bAggMax = False ' Aggregate Maximum
If FIELD.FldGroupByShowSummary <> 0 Then
bShowSummary = True
End If
If bShowSummary Then
For j = 1 to TABLE.Fields.Count
Set FIELD2 = TABLE.Fields.Seq(j)
If FIELD2.FldList And FIELD2.FldGroupBy <= 0 And FIELD2.FldGenerate And FIELD2.FldHtmlTag <> "FILE" Then
If FIELD2.FldRptAggSum Then
bAggSum = True
End If
If FIELD2.FldRptAggAvg Then
bAggAvg = True
End If
If FIELD2.FldRptAggMin Then
bAggMin = True
End If
If FIELD2.FldRptAggMax Then
bAggMax = True
End If
End If
Next
End If
##-->
If bLvlBreak(<!--##=grpID##-->) Then
%>
<!--## If bShowSummary Then ##-->
<tr><!--##=sTDIndent##--><td<!--##=sTDSpanSum##--><!--##=ewCSSGroupSummary##-->><span class="aspmaker"><!--##@RptSumHead##--> <!--##=FIELD.FldCaption##-->: <% tmp_<!--##=FIELD.FldVar##--> = <!--##=FIELD.FldVar##-->: <!--##=FIELD.FldVar##--> = grp_<!--##=FIELD.FldVar##--> %><!--##=FieldView##--><% <!--##=FIELD.FldVar##--> = tmp_<!--##=FIELD.FldVar##--> %> (<%= FormatNumber(nCntRecs(<!--##=grpID##-->),0) %> <!--##@RptDtlRec##-->)</span></td></tr>
<!--##
If bAggSum Then
##-->
<tr><!--##=sTDIndent##-->
<td<!--##=sTDSpan##--><!--##=ewCSSGroupAggregate##-->><span class="aspmaker"><!--##@RptSum##--></span></td>
<!--##
For j = 1 to TABLE.Fields.Count
Set FIELD = TABLE.Fields.Seq(j)
If FIELD.FldList And FIELD.FldGroupBy <= 0 And FIELD.FldGenerate And FIELD.FldHtmlTag <> "FILE" Then
If FIELD.FldRptAggSum Then
##-->
<td><span class="aspmaker"><% <!--##=FIELD.FldVar##--> = s<!--##=FIELD.FldVar##-->(<!--##=grpID##-->) %><!--##=FieldView##--></span></td>
<!--##
Else
##-->
<td><span class="aspmaker"> </span></td>
<!--##
End If
End If
Next
##-->
</tr>
<!--##
End If
If bAggAvg Then
##-->
<tr><!--##=sTDIndent##-->
<td<!--##=sTDSpan##--><!--##=ewCSSGroupAggregate##-->><span class="aspmaker"><!--##@RptAvg##--></span></td>
<!--##
For j = 1 to TABLE.Fields.Count
Set FIELD = TABLE.Fields.Seq(j)
If FIELD.FldList And FIELD.FldGroupBy <= 0 And FIELD.FldGenerate And FIELD.FldHtmlTag <> "FILE" Then
If FIELD.FldRptAggAvg Then
##-->
<td><span class="aspmaker"><% If nCntRecs(<!--##=grpID##-->) > 0 Then <!--##=FIELD.FldVar##--> = s<!--##=FIELD.FldVar##-->(<!--##=grpID##-->) / nCntRecs(<!--##=grpID##-->) Else <!--##=FIELD.FldVar##--> = 0 End If %><!--##=FieldView##--></span></td>
<!--##
Else
##-->
<td><span class="aspmaker"> </span></td>
<!--##
End If
End If
Next
##-->
</tr>
<!--##
End If
If bAggMin Then
##-->
<tr><!--##=sTDIndent##-->
<td<!--##=sTDSpan##--><!--##=ewCSSGroupAggregate##-->><span class="aspmaker"><!--##@RptMin##--></span></td>
<!--##
For j = 1 to TABLE.Fields.Count
Set FIELD = TABLE.Fields.Seq(j)
If FIELD.FldList And FIELD.FldGroupBy <= 0 And FIELD.FldGenerate And FIELD.FldHtmlTag <> "FILE" Then
If FIELD.FldRptAggMin Then
##-->
<td><span class="aspmaker"><% <!--##=FIELD.FldVar##--> = n<!--##=FIELD.FldVar##-->(<!--##=grpID##-->) %><!--##=FieldView##--></span></td>
<!--##
Else
##-->
<td><span class="aspmaker"> </span></td>
<!--##
End If
End If
Next
##-->
</tr>
<!--##
End If
If bAggMax Then
##-->
<tr><!--##=sTDIndent##-->
<td<!--##=sTDSpan##--><!--##=ewCSSGroupAggregate##-->><span class="aspmaker"><!--##@RptMax##--></span></td>
<!--##
For j = 1 to TABLE.Fields.Count
Set FIELD = TABLE.Fields.Seq(j)
If FIELD.FldList And FIELD.FldGroupBy <= 0 And FIELD.FldGenerate And FIELD.FldHtmlTag <> "FILE" Then
If FIELD.FldRptAggMax Then
##-->
<td><span class="aspmaker"><% <!--##=FIELD.FldVar##--> = m<!--##=FIELD.FldVar##-->(<!--##=grpID##-->) %><!--##=FieldView##--></span></td>
<!--##
Else
##-->
<td><span class="aspmaker"> </span></td>
<!--##
End If
End If
Next
##-->
</tr>
<!--##
End If
##-->
<tr><td colspan=<!--##=nFlds+nGroups##-->><span class="aspmaker"> <br></span></td></tr>
<!--## End If ##-->
<%
End If
<!--##
Next
##-->
Loop
' Close recordset and connection
rs.Close
Set rs = Nothing
<!--##
End If
##-->
conn.Close
Set conn = Nothing
%>
<!--##
If TABLE.TblRptShowGrandTotal Then
If nGroups > 0 And sIndent <> "" Then
nDtlSpan = nGroups
Else
If bAggregate Then
nDtlSpan = 1
Else
nDtlSpan = 0
End If
End If
If nDtlSpan > 1 Then
sTDSpan = " colspan=" & nDtlSpan
Else
sTDSpan = ""
End If
##-->
<tr><td colspan=<!--##=nFlds+nDtlSpan##-->><span class="aspmaker"> <br></span></td></tr>
<tr><td colspan=<!--##=nFlds+nDtlSpan##--><!--##=ewCSSGrandSummary##-->><span class="aspmaker"><!--##@RptGrandTotal##--> (<%= FormatNumber(nCntRecs(0),0) %> <!--##@RptDtlRec##-->)</span></td></tr>
<!--##
If bAggSum Then
##-->
<tr>
<td<!--##=sTDSpan##--><!--##=ewCSSGroupAggregate##-->><span class="aspmaker"><!--##@RptSum##--></span></td>
<!--##
For j = 1 to TABLE.Fields.Count
Set FIELD = TABLE.Fields.Seq(j)
If FIELD.FldList And FIELD.FldGroupBy <= 0 And FIELD.FldGenerate And FIELD.FldHtmlTag <> "FILE" Then
If FIELD.FldRptAggSum Then
##-->
<td><span class="aspmaker"><% <!--##=FIELD.FldVar##--> = s<!--##=FIELD.FldVar##-->(0) %><!--##=FieldView##--></span></td>
<!--##
Else
##-->
<td><span class="aspmaker"> </span></td>
<!--##
End If
End If
Next
##-->
</tr>
<!--##
End If
If bAggAvg Then
##-->
<tr>
<td<!--##=sTDSpan##--><!--##=ewCSSGroupAggregate##-->><span class="aspmaker"><!--##@RptAvg##--></span></td>
<!--##
For j = 1 to TABLE.Fields.Count
Set FIELD = TABLE.Fields.Seq(j)
If FIELD.FldList And FIELD.FldGroupBy <= 0 And FIELD.FldGenerate And FIELD.FldHtmlTag <> "FILE" Then
If FIELD.FldRptAggAvg Then
##-->
<td><span class="aspmaker"><% If nCntRecs(0) > 0 Then <!--##=FIELD.FldVar##--> = s<!--##=FIELD.FldVar##-->(0) / nCntRecs(0) Else <!--##=FIELD.FldVar##--> = 0 End If %><!--##=FieldView##--></span></td>
<!--##
Else
##-->
<td><span class="aspmaker"> </span></td>
<!--##
End If
End If
Next
##-->
</tr>
<!--##
End If
If bAggMin Then
##-->
<tr>
<td<!--##=sTDSpan##--><!--##=ewCSSGroupAggregate##-->><span class="aspmaker"><!--##@RptMin##--></span></td>
<!--##
For j = 1 to TABLE.Fields.Count
Set FIELD = TABLE.Fields.Seq(j)
If FIELD.FldList And FIELD.FldGroupBy <= 0 And FIELD.FldGenerate And FIELD.FldHtmlTag <> "FILE" Then
If FIELD.FldRptAggMin Then
##-->
<td><span class="aspmaker"><% <!--##=FIELD.FldVar##--> = n<!--##=FIELD.FldVar##-->(0) %><!--##=FieldView##--></span></td>
<!--##
Else
##-->
<td><span class="aspmaker"> </span></td>
<!--##
End If
End If
Next
##-->
</tr>
<!--##
End If
If bAggMax Then
##-->
<tr>
<td<!--##=sTDSpan##--><!--##=ewCSSGroupAggregate##-->><span class="aspmaker"><!--##@RptMax##--></span></td>
<!--##
For j = 1 to TABLE.Fields.Count
Set FIELD = TABLE.Fields.Seq(j)
If FIELD.FldList And FIELD.FldGroupBy <= 0 And FIELD.FldGenerate And FIELD.FldHtmlTag <> "FILE" Then
If FIELD.FldRptAggMax Then
##-->
<td><span class="aspmaker"><% <!--##=FIELD.FldVar##--> = m<!--##=FIELD.FldVar##-->(0) %><!--##=FieldView##--></span></td>
<!--##
Else
##-->
<td><span class="aspmaker"> </span></td>
<!--##
End If
End If
Next
##-->
</tr>
<!--##
End If
End If
##-->
<tr><td colspan=<!--##=nFlds+nDtlSpan##-->><span class="aspmaker"> <br></span></td></tr>
</table>
</form>
<!--## If nGroups > 0 Then ##-->
<%
' Check Level Break
Sub ChkLvlBreak()
<!--## For i = 1 to nGroups ##-->
bLvlBreak(<!--##=i##-->) = False
<!--## Next ##-->
If nRecCount = 0 Then ' Start Or End of Recordset
<!--## For i = 1 to nGroups ##-->
bLvlBreak(<!--##=i##-->) = True
<!--## Next ##-->
Else
<!--##
arrGroups = split(sGroupFldNames,",")
For i = 0 to ubound(arrGroups)
Set FIELD = TABLE.Fields(arrGroups(i))
sFldVar = FIELD.FldVar
##-->
If IsNull(<!--##=sFldVar##-->) Or IsNull(grp_<!--##=sFldVar##-->) Or (<!--##=sFldVar##--> <> grp_<!--##=sFldVar##-->) Then
<!--## For j = i+1 to nGroups ##-->
bLvlBreak(<!--##=j##-->) = True
<!--## Next ##-->
End If
<!--##
Next
##-->
End If
End Sub
%>
<!--## End If ##-->
<!--##/session##-->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -