Skip to Content
0

Count function in Crystal

Jun 23, 2017 at 09:12 PM

41

avatar image

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 left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

maju maju Jun 26, 2017 at 06:05 PM
0

Any guideline on this?

Share
10 |10000 characters needed characters left characters exceeded
Ian Waterman Jun 27, 2017 at 08:16 AM
0

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'

replace with your fields

Ian

Show 1 Share
10 |10000 characters needed characters left characters exceeded

If formula returns check then you will need to review logic and try to eliminate

Ian

0