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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

crystal 10 - summary formula help!

Status
Not open for further replies.

catchingup

Technical User
May 11, 2006
37
US
i am writing a report in cr10 - the formulas all work correctly right now but i'm trying to add in an additional summary field and it won't allow me to using the sum function. I tried writing a formula with formula editor to perform the same function and i get an error indicating "Field is Required here" - the setup is as follows:

DETAIL LEVEL FIELDS:
{job size}
{@indivcost/sf}
*this formula is:
if {PEE_ESTIMATE_ITEM.Takeoff_Quantity} <> 0 then
{@Total Amount} / {PEE_ESTIMATE_ITEM.Takeoff_Quantity}

GROUP FTR FIELDS:
{@COST/SF}
*this formula is:
Sum({@Total Amount},{PEE_ESTIMATE_ITEM.Phase_Code})/{PEE_ESTIMATE_COVERPG_SETUP.Job_Size}

RPT FTR FIELDS:
I'm trying to add the summary of the group footer formula - which will give me an overall Cost/SF.....if i try to use the Summary function, choosing the formula field {@COST/SF} is not an option, or if i write the summary formula i get this error message:
---------------------------
Crystal Reports 10 for Best
---------------------------
This field cannot be summarized.
---------------------------
OK
---------------------------


Any ideas???
 
Try:

*this formula is:
whileprintingrecords;
MyTotal;
MyCount:=MyCount+1;
MyTotal:=MyTotal+
Sum({@Total Amount},{PEE_ESTIMATE_ITEM.Phase_Code})/{PEE_ESTIMATE_COVERPG_SETUP.Job_Size};
Sum({@Total Amount},{PEE_ESTIMATE_ITEM.Phase_Code})/{PEE_ESTIMATE_COVERPG_SETUP.Job_Size}

Then in the report footer place:

whileprintingrecords;
MyTotal;
MyCount;
MyTotal/MyCount

Adding them doesn't give you the average does it (what you call the overall I think, try using real technical terms), it gives you the sum, right?

So I added in a counter so that you can then do the math:

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top