Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

Adding totals of columns in repeater

  Asked By: Rose    Date: Jul 10    Category: Asp.net    Views: 2205
  

The repeater is a toughy for me. I have tryed to sum
the totals and display them at the bottom of each
column. For some reason I am not getting the correct
totals. Here is my code below.


Dim StdFee_Tot As Double = 0
Protected Sub Collections()
MyConnect.Open()
Dim TotalAllow_Tot As Double
Dim InsurEst_Tot As Double
Dim InsurAct_Tot As Double
Dim InsurDiff_Tot As Double
Dim PatEst_Tot As Double
Dim PatPdDate_Tot As Double
Dim PatOwe_Tot As Double
Dim CoPayEst_Tot As Double
Dim CoPayToDate_Tot As Double
Dim CoPayOwe_Tot As Double
Dim strSQL As String = "Select *,
QTY1*CHARGES1 As StdFee," & _
"AllowableAmt - insurancepaid As InsureVar "
& _
"from tCollectionQ " & _
"where ACCOUNTNUM = " & _
Lbl_AccountNum.Text & "and DOS='" &
Lbl_DOS.Text & "'"
Dim objAdapter As SqlDataAdapter = New
SqlDataAdapter(strSQL, MyConnect)
Dim CollectionQDS As DataSet = New DataSet()
objAdapter.Fill(CollectionQDS,
"CollectionQinfo")
Dim dRow As DataRow =
CollectionQDS.Tables("CollectionQinfo").Rows(0)
For Each dRow In
CollectionQDS.Tables("CollectionQinfo").Rows
StdFee_Tot = StdFee_Tot +
CType(dRow("CHARGES1"), Double)
Next

CollectionsTable.DataSource = CollectionQDS
CollectionsTable.DataBind()


Dim SQLCommand As New SqlCommand(strSQL,
MyConnect)
Dim SQLReader = SQLCommand.ExecuteReader()
CollectionsTable.DataSource = SQLReader
CollectionsTable.DataBind()
SQLReader.close()
MyConnect.Close()
End Sub

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Adding totals of columns in repeater Or get search suggestion and latest updates.




Tagged: