Skip to Content
0

This field cannot be summarized error in Crystal Reports

Feb 07, 2017 at 08:25 PM

45

avatar image

Hello,

I have the following formula on my report for calculating Actual Hours:

Actual Hours =

If ((Sum ({@StdTime}, {USERS.USER_NAME}))) = 0 Then 0 Else (({PRODUCTIVE_HOURS.PRODUCTIVE_HOURS} * {@StdTime})/ (Sum ({@StdTime}, {USERS.USER_NAME})))

However, when i try to create a sum of this field to display in the group footer, I keep getting an error which states "This field cannot be summarized" and I cannot proceed forward.

Can someone please help me with this issue?

Thanks,

Nick

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Brian Dong Feb 07, 2017 at 09:05 PM
0

Hi Nick,

Crystal is complaining about the @StdTime formula. Can you show us the code for the formula. Usually this means that formula is using something that can't be summarized. Whether it's a running total or a function that is already summarizing another field.

Thanks,

Brian

Share
10 |10000 characters needed characters left characters exceeded
Nick Jones Feb 07, 2017 at 09:10 PM
0

Hi Brian,

The formula for StdTime is as below:

If (ToNumber({REPORT_LIST.StdPerHour}) = 0) Then 0 Else ({PRODUCTIVITY_LOG.LOG_VALUE}/ToNumber({REPORT_LIST.StdPerHour}))

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Nick,

Where in the report did you place this the StdTime formula? If you were to drop the StdTime formula into the Detail section, right-click and select Summarize and have it go into the Group Footer, does that work?

Is your group based on {USERS.USER_NAME}?

If the summary field works, I'm going to try to get you to break down your formula and see where it fails. So just try:

((Sum ({@StdTime}, {USERS.USER_NAME})))

and see if it works. If that works then just do:

(({PRODUCTIVE_HOURS.PRODUCTIVE_HOURS} * {@StdTime})/ (Sum ({@StdTime}, {USERS.USER_NAME})))

I'm hoping one of these two will fail then we can focus on fixing that part.


Good luck,

Brian

0