cancel
Showing results for 
Search instead for 
Did you mean: 

If Then statement

Former Member
0 Kudos

I'm looking to create an if then statement that only publishes a specific number if a specific phrase is present in the report. As you can see in the picture from my report below, I would like to only publish the value that is associated with the term HEAT TREAT. Not the values before or after. In my report, there can be numerous operations and each has a complete quantity associated with it depending on how many and what type of process the part requires. I was trying to create a formula like

If {MIMORD.opCode}= "HEAT TREAT"

Then {MIMORD.compQty}

Which says in a nut shell If {Operation} = "HEAT TREAT"

                                      Then " Show HEAT TREAT Completed Qty"

Unfortunately, this equation produces a 0 instead of the value 1,115.00

Capture.JPG

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Amanda,

I don't see the image you've attached.

If you're trying to display the value at the end of the report and if the formula should 'look' at records on each row, then the formula should be modified to:

whileprintingrecords;

If instr({MIMORD.opCode}, "HEAT TREAT") > 0 then

     numbervar qty := {MIMORD.compQty};

"";

The above formula should be placed on the details section.

You'll then need another formula to 'display' that value and this should go in the footer:

whileprintingrecords;

numbervar qty;

-Abhilash


Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

Try this:

If {MIMORD.opCode} = "HEAT TREAT"

Then {MIMORD.compQty}

else If {Operation} = "HEAT TREAT"

Then {HEAT TREAT.compQty}

Capture.JPG is not attached please check once.

Thanks,

DJ