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

IF statements / whileprintingrecords

$
0
0

Hello,

 

Here is my screen when running

 

Job           Standard Pack                  Run Qty            Value

A                    0                                      0                      0

B                    5                                      10                   0         

C                    10                                   100                    10

D                    20                                   5                         100

E                    40                                   2                         5

 

 



In the column Value it is reading the previous equation.

 

Here is my formula:

 

Shared NumberVar K;        //Run Qty Value

Shared NumberVar BINDAY;  //Value Column

Shared NumberVar STDPACK;  //Standard Pack

Whileprintingrecords;

If STDPACK > 0 then

     BINDAY := ROUNDUP(RUNQTY / K)    // THIS IS WHAT I WANT TO DO

Else

     BINDAY := 0;

 

When I run this run this formula it errors out for division by zero.

 

So testing I replace this after the 1st if statement

     BINDAY := (RUNQTY)              // the above screen out is what I get.

 

Question: How can I get the current line of data for my formula to use, currently it is using the previous line?


Viewing all articles
Browse latest Browse all 2878

Trending Articles



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