on 2023 Aug 04 6:13 PM
Hi there, In crystal reports
I am trying to create a formula/ summary of how many times "Warranty" shows up in the Comments column, and a separate count of "Parts".
Ideally having 2 separate formulas to count each item would be great.
What i've tried so far was
formula name: Warranty
if {report.name.comments} = "Warranty" then 1 else 0
Then inserted a Summary with the warranty formula, I tried (Sum, Count, Count distinct) and it was all incorrect.
Help? thank you in advance.
Title: Comments:
Request clarification before answering.
Create a formula like this:
If instr({Report.reportcomments}, "Warranty") > 0 THEN 1 ELSE 0
To get the count of records containing that word, SUM that formula. You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Place the formula in the detail section. Observe if it returns 1 for the matching cases. If not, fix the formula.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did not add sections by "groups". So, there aren't necessarily any groups. But my intent is to calculate Number of records that contain "Warranty" then supply a total at the bottom of the report and do the same for the word "Parts".
I tried this formula from reading online how to's but it doesn't work.
Formula 1 Name: Warranty
If {Report.reportcomments} = "Warranty" then 1; Else 0
Formula 2 Name: Parts
If {Report.reportcomments} = "Parts" then 1; else 0
There were 51 total records: of those 51 records, Warranty appeared = 11 times, and Parts appeared 9 times. Then I went to "summary" inserted the new formula. I tried selecting "count", "count distinct", "sum" but none of these worked accurately. When I did "sum" it counted the entire report and instead of just records with "warranty".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
30 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.