Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula field not available for summary or running total

Status
Not open for further replies.

amenconi

IS-IT--Management
Jul 27, 2010
6
US
In my report data is pulled and highlighted yellow if below a certain value and highlighted red above another value and if in between the values then highlighted green (example below):

if GroupName ({Production_Inventory_Detail.Unit Name}) = "[Unit]" and GroupName ({Production_Inventory_Detail.Part Number}) = "[Model]" and {Production_Inventory_Detail.Glass Weight} > 8.71
then crRed else
if GroupName ({Production_Inventory_Detail.Unit Name}) = "[Unit]" and GroupName ({Production_Inventory_Detail.Part Number}) = "[Model]" and {Production_Inventory_Detail.Glass Weight} < 8.01
then crYellow else
crLime


The highlighting code above works fine. I then created a formula field that assigned itself of 1 if the value was above or below (red and yellow) and 0 if in between (green). I just copied the if then code from above and replaced the crRed and crYellow with 1 and crLime with 0. This also works, for each detail I can see a 1 value under each number highlighted yellow and red and a 0 value under each number highlighted green.

However when I try to right-click insert on the new formula field there is no Summary... option. Similarly when I try to set a running total field to count up the total it doesn't list the new formula field to total at all.

What I'd like to do is sum or total those values for each day then create a line graph that plots the summed totals for each day in the last month.

Any clues as to why this isn't working? I'm sure there are plenty of other ways to do what I want and will explore them but would be interested to know why that formula field isn't listed when trying to sum or running total it.

Thanks for any help. Let me know if I need to list any other code in the report.
 
Remove the groupname() and use the field you are grouping on directly. I have never had occasion to use the groupname in a formula.

-LB
 
Yes this worked. Thank you very much.
 
The general rule is, formula fields can only be summarised if they are based on a single detail line. Crystal's cycle of operation does not allow for summaries of summaries.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top