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

Doesn't allow me to do a SUM or RUNNING TOTAL

Status
Not open for further replies.

WHITE6174

Programmer
Oct 24, 2005
3
US
Im trying to do a sum of this formula, but it gives me no option to pick the formula in either SUM or RUNNING TOTAL.

I'm guessing from what I read in other posts that it has something to do with the PreviousValue() function or data type.

Any ideas on how to fix this would be greatly appreciated.

steve


If PreviousValue ({@LINEAMOUNT}) ={@LINEAMOUNT} and PreviousValue ({OECOINO.ORDUNIQ})= {OECOINO.ORDUNIQ} and PreviousValue ({OECOINO.DETAILNUM}) = {OECOINO.DETAILNUM} Then
formula = 0
Else
formula = {@LINEAMOUNT}
End If
 
What are you trying to do? It seems you should group on some field, and insert a simple summary on {@LineAmount}

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Both summaries and running totals look at individual detail lines. Having PreviousValue means you can't do this.

As dgillz says, you could get the same result by grouping. Or you could do a running total on {@LINEAMOUNT}
that does the various tests while summing it. You can include PreviousValue in the evaluation formula of a running total.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thanks guys,

Did a running total, with this code in the evaluation section


If PreviousValue ({@LINEAMOUNT}) ={@LINEAMOUNT} and PreviousValue ({OECOINO.ORDUNIQ})= {OECOINO.ORDUNIQ} and PreviousValue ({OECOINO.DETAILNUM}) = {OECOINO.DETAILNUM} Then
formula =false
else
formula = true
end if


thanks again
steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top