Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Count Specific Value Post Reply Post New Topic
Author Message
fuller31
Newbie
Newbie


Joined: 29 May 2017
Location: United States
Online Status: Offline
Posts: 22
Quote fuller31 Replybullet Topic: Count Specific Value
    Posted: 23 Apr 2018 at 5:59am
In my report, I need to total how many times per each code the codes VER, WW, and UTC have been used in the field lwmain.ccode. I need these values to reset for each group. I've been trying formulas and running totals for hours and cannot get it to work properly. Can anyone help? Thank you!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Apr 2018 at 6:25am
you can create 3 running totals (RT) or, depending on if you can display the other values just use a cross-tab in the group footer

RT example.
Right click on Running Total
select New
Name = VERcount
Field to Summarize = can be just about anything but best if it is the primary Key of the report (like a transactionid)
Type OF summary = Count (or a distinct Count if you have dupes you are trying to avoid)
Evaluate = Use a formula
lwmain.ccode = 'VER'
Reset = On change of group (select your group)
Place the RT in the group footer, it will not work in a group header
Repeat for the other two items but change the evaluation criteria (formula)

Edited by DBlank - 23 Apr 2018 at 6:26am
IP IP Logged
fuller31
Newbie
Newbie


Joined: 29 May 2017
Location: United States
Online Status: Offline
Posts: 22
Quote fuller31 Replybullet Posted: 23 Apr 2018 at 6:32am
I apparently wasn't using my brain, but have figured it out.

Formula for each code:
if {lwmain.ccode}="code"
then 1
else 0

Make a summary, and sum each formula.

Edited by fuller31 - 23 Apr 2018 at 6:32am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.