Count function in Crystal

testing.txt

How do i get the below result in Crystal report? I am totally new to Crystal report.

Scenario 1: I am trying to write a report showing that if the PO-Num is same and Order_Num is same, then give me the Order_Num.

Scenario 2: If the PO_Num is Same and the order_Num are different, then return the word RC.

I am able to achieve this result using this formula in excel. i had to do 2 steps.

Column C and D are my results

Column C =IF(COUNTIFS(A:A,A1,B:B,B1)=COUNTIF(A:A,A1),"MC","RC")

Column D = =IF(C2="MC",B2, "RC")

I have attached a txt file.

Thanks!!

capture.jpg (59.0 kB)
testing.txt (1.1 kB)
10|10000 characters needed characters exceeded

• Jun 26, 2017 at 06:05 PM

Any guideline on this?

10|10000 characters needed characters exceeded
• Jun 27, 2017 at 08:16 AM

Group Report by PO Number and suppress Header and footer

Create formula

@Result

If distinctcount(orderno, poNumber) = 1 then orderno

else

If count(orderno, poNumber) > 1 and distinctcount(orderno, poNumber) > 1 then 'RC'

else

'Check'