Sum Of Time In RDLC Report

喜你入骨 提交于 2019-12-12 03:15:53

问题


I want to sum this WorkedHours in RDLC Report..WorkedHours type is Varchar..

WorkedHours
  04:00:25
  07:23:01
  11:02:15

like Total: 22:25:41

How Can I Achieve It ?


回答1:


You can use the TimeStamp class gether with the Sum function, follow an example:

=TimeSpan.FromMinutes(Sum(Fields!Dirigindo.Value))




回答2:


You need to either calculate it in the Dataset. Perhaps casting it to a proper date time format (you can give it a dummy date component such as 1900-01-01 and then perform the calculation use Datediff):

or use an SSRS expression using the TimeSpan object:

http://msdn.microsoft.com/en-us/library/system.timespan.aspx



来源:https://stackoverflow.com/questions/8615063/sum-of-time-in-rdlc-report

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!