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

Running Totals Conditional Formula - Beginner

Status
Not open for further replies.

hld24

MIS
Mar 28, 2007
23
US
Using Crystal 10 I am in the Running totals conditional formual screen. I am needing to add up all the apples that meet the conditions of "NF" and status of "IN Basket" OR "TREED".

I am missing something as the "save and close" function kicks back the error:
"The Remaining text does not appear to be part of the formula."


Sum({FILE1.Apple})where{FILE1.ActionType}= "NF" and {FILE1.Status}= "In BASKET" or {FILE1.Status} = "Treed
 
Set up the running total to do a sum of apples and in the evaluation formula area, use:

{FILE1.ActionType}= "NF" and
{FILE1.Status} in ["In BASKET","Treed"]

Then use reset never, if you want the summary at the grand total level, or on change of group, if at some group level. The running total must be placed in a footer section.

-LB
 
Thank you for your quick respone. I am getting closer. I also need to look at all action types that = "F" in the group. I completed my formula as follows:

{FILE1.ActionType}= "NF" and
{FILE1.Status} in ["In BASKET","Treed"]
or
{FILE1.ActionType}= "F" and
{FILE1.Status} in ["In BASKET","Treed"]

The values for "F" are correct, but the "NF" values are not. I use Access queries to verify my work. I have the record set to change on group "ActionType". I tried "Never", but that acted like a running total.
 
Do a temporary version of the report, with an extra detail line that shows the running total as it 'runs'. They you'll see where it is failing.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
I think the use of "or" without setting off the two clauses in parens caused the problem. You could instead use an evaluation formula of:

{FILE1.ActionType}in ["NF","F"] and
{FILE1.Status} in ["In BASKET","Treed"]

If you want the running total to summarize at the group level, it should be reset on change of group. If at the grand total level, it should be reset never.

-LB
 
Thank you very much. That was it!! Excellent job.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top