How to Sum Report Items HH:MM:SS in Group footer with reportViewer vb.net 2010

已答复 How to Sum Report Items HH:MM:SS in Group footer with reportViewer vb.net 2010

  • Friday, August 10, 2012 5:31 AM
     
     

    Please Help me,

    Column-A    column_B  TimeDiff   <---Datediff() Here i'd used this function

    a 2/05/12  00:00:00

    a 4/05/12  02:25:17

    a 6/05/12  01:45:55

    a)Total timeDiff   03:11:12   <--- i need this total Group a  <----Here i got 75:11:12

    Column-A    column_B   TimeDiff

    B 2/05/12  00:00:00

    B 4/05/12  02:25:17

    B 6/05/12  01:45:55

    B)Total timeDiff   03:11:12

    Grand Total 06:22:27

    i'd tried This coding 

    Time Diff Function
    Dim hours As Double=0
    Dim mins As Double =0
    Dim sec As Double =0
    Dim Sum as Double=0
    Dim total as integer=0

    Public Function formatTimeAdd(ByVal  tempNumberSecond As Integer) 
    'Format output

    total=total+tempNumberSecond 
    Return total
    End Function

    Function GetformatTimeAdd() as String

    hours=( total) \ 3600
    mins =( total- hours * 3600) \ 60
    sec=( total- hours * 3600-mins*60) 

    GetformatTimeAdd=hours.ToString("#,#0.##") & ":" & mins.ToString("#,#00.##") &":" & sec.ToString("#,#00.##") & ""
    total=0
    End Function



    • Edited by Emalai Friday, August 10, 2012 5:33 AM
    •  

All Replies