开发者

Crystal reports: using summary field in formula / summing time field in formula

开发者 https://www.devze.com 2023-04-12 06:47 出处:网络
In crystal reports I w开发者_Go百科ant to show the sum value of time objects, i.e. An employee worked in one month three days and on each day a variable amount of hours.

In crystal reports I w开发者_Go百科ant to show the sum value of time objects, i.e. An employee worked in one month three days and on each day a variable amount of hours.

Is there anyway to sum a time field?

Or as a workaround I could use the time field as an integer, sum this and display. But then I would like to change the display format by using a formula. I cant find a way to include summary fields in a formula...

Thanks in advance

PS I am using CR 2011 (just the program not through VB or anything).


You cannot sum a date/time field. You will have to use datediff("n",{datetime1},{datetime2}) to get a time interval between two date/time fields in minutes.

To use a summary function in a formula, you can use this sum({@YourMinutesFormula},{FieldYouAreGroupingOn})

You may omit the second parameter if you want the summation over the entire report instead of a grouping level. Check the Crystal Reports help file for more details on Sum().

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号