Click here to Skip to main content
15,888,301 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to make sum of values or rows. But there is one problem: I have all values of rows as string and with (00:00:00) format. How do I make sum of this type of string in rdlc report? I've shown data as group like:

Name   val
a      12:35:56  (This is string)
b     345:54:45  (This is string)
c      65:15:10  (This is string)
----------------
Total 423:45:51

Please any body help me. Thanks in advance...
Posted
Updated 24-May-16 3:35am

Hello,
Try this
If Your Data comes in Time format then you need to add
=Sum(Fields!val.Value)
in footer row for "Val" column.
 
Share this answer
 
C#
DateTime to String	=CStr(Fields!Date.Value)
String to DateTime	=DateTime.Parse(Fields!DateTimeinStringFormat.Value)
String to DateTimeOffset	=DateTimeOffset.Parse(Fields!DateTimeOffsetinStringFormat.Value)
Extracting the Year	=Year(Fields!TimeinStringFormat.Value)

 -- or --

 =Year(Fields!TimeinDateTimeFormat.Value)
Boolean to Integer	=CInt(Parameters!BooleanField.Value)

-1 is True and 0 is False.
Boolean to Integer	=System.Convert.ToInt32(Fields!BooleanFormat.Value)

1 is True and 0 is False.
Just the DateTime part of a DateTimeOffset value	=Fields!MyDatetimeOffset.Value.DateTime
Just the Offset part of a DateTimeOffset value	=Fields!MyDatetimeOffset.Value.Offset
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900