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 outputtotal=total+tempNumberSecond
Return total
End FunctionFunction 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
-
Friday, August 10, 2012 6:23 AMAnswerer
HI Emalai !
Seems like you already have an answer to this in below thread;
From your description, you are designning a client report definition (.rdlc) file. Let's assume the name of the field placed in the Column_A is "Column_A" and the name of the field placed in "Column_B" is "Column_B", and then, I suggest that you refer to the following steps:
- Drag a Table control to the design surface.
- Place "Column_B" in the Details row.
- Add a parent group for the Details group, and set the group to group on the "Column_A" field.
- Right-click on the details row of the "TimeDiff" column, select "Add Total".
- Right-click on the textbox that contains "Column_A" field, and select "Add Total"-> "After".
For more information, please refer to the following article:
http://msdn.microsoft.com/en-us/library/ms170712(v=sql.105).aspxBesides, this question is probably better served by the Visual Studio Report Controls forum where the experts are more familiar with the ReportViewer control. For your convenience, I have included link below:
Thanks, Hasham Niaz
http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/threads?page=1- Proposed As Answer by Charlie LiaoMicrosoft Contingent Staff, Moderator Tuesday, August 14, 2012 2:11 AM
- Marked As Answer by Charlie LiaoMicrosoft Contingent Staff, Moderator Friday, August 17, 2012 9:36 AM

