Skip to Content
avatar image
Former Member

Pulling Data from the last 30 days

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!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • 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?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 08 at 07:23 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 08 at 08:41 PM

    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?

    Add comment
    10|10000 characters needed characters exceeded