Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8635

Re: How to capture the latest status in a crystal formula

$
0
0

I would try using another formula with a variable.  Assuming that you're looking at the status of "orders", it might look like this:

 

{@ResetFulfilled}

BooleanVar fulfilled := false;

 

Put this in the Order group header section.

 

You would then change your formula slightly to this:

 

shared numbervar diff;

shared datevar start;

shared datevar end;

shared BooleanVar fulfilled;

 

if {NAME} = 'In Progress' then

    start := date({DATE_TIME})

else if {NAME} = ['On Hold', 'Fulfilled'] then

    if {NAME} = 'Fulfilled' then fulfilled := true;

    if not fulfilled then

 

 

      end := date({DATE_TIME});

      if start <> cdate(0,0,0) then

      (

          diff := diff + DateDiff('d',start,end);

      );

    ;

    end;

)

 

-Dell


Viewing all articles
Browse latest Browse all 8635

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>