Skip to Content
0

Pulling Data from the last 30 days

Feb 08 at 06:29 PM

28

avatar image
Former Member

Good Morning Crystal Report community,

I am looking for assistance in creating a column that will calculate the past 30 day usage total product consumption. I am having a hard time creating an expression for this and when I create something, it doesn't work out right. So right now, I have this expression, but when I apply this expression, it messes everything up and all of the products go missing as well. Can somebody tell me what is wrong with my expression and how I can fix it?

if {STOJOU.IPTDAT_0} in Aged0To30Days then {#QTYSTK}

Thanks!

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

3 Answers

Vitaly Izmaylov
Feb 08 at 06:40 PM
-1

Do one step at a time. Try to use manual running total, see the formula below.

numbervar n;

if {STOJOU.IPTDAT_0} in Aged0To30Days then n:=n+1;

n

Does it work?

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Feb 08 at 07:23 PM
0

No that did not work. Don't I need to define n?

Share
10 |10000 characters needed characters left characters exceeded
Vitaly Izmaylov
Feb 08 at 08:41 PM
0

The "n" got declared in the first line: numbervar n;

You need all 3 lines in the formula

Then drop the formula to Details section

It works for me, so when you say did not work, what it means? Does the formula not retuen anything, return zeroes or error?

Share
10 |10000 characters needed characters left characters exceeded