Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Wild sorting question. Post Reply Post New Topic
<< Prev Page  of 2
Author Message
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Posted: 14 Sep 2010 at 5:45am
Sorry to waste your time. My boss wants me to export the tables into Excel and try it in there.
IP IP Logged
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Posted: 14 Sep 2010 at 5:50am
Well, I thought we were but the tables won't link right. I guess I just need to figure out a formula that does this.

I grouped it by the name and then did 2 summaries. One was by Number SUM and the other was by number Count. Then when I go to Select Expert, I have to select Show Formula and switch it to Group and enter:
SUM(numberfield)=Count(numberfield)

I get no returns.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Sep 2010 at 6:04am
YOu have to do it at the group level not the report level. Hence the use of the grouping on the name field.
SUM(numberfield,name field)=Count(numberfield, name field)
IP IP Logged
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Posted: 14 Sep 2010 at 6:10am
I am letting my partner look at it. She says she thinks she knows what you are saying. My mind has been on this project for too many hours in a row.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Sep 2010 at 6:22am
No prob.
Here is what we are doing if it helps.
Creating a group on the name so we can get unique numbers per person.
Then we are going to count all of the rows that appear under the that name...
Count(numberfield,name)
Place it in group footer1 to see the value and make sure it works
Then we want to see the sum of the number value in each row for each person
SUM(numberfield,name)
You can also place this on the group footer to make it works.
 
Next we want to use this information in a logical way to see who only has the value of 1 on every row.
 
Logically, since every row must have a value of 1 or more, the only way a person can have a 1 on every row is for the SUM of the value to be the same as the count of the rows (1:1). As soon as a value is more than 1 on any row your SUM will always be more than your COUNT.
In Crystal you can use the select expert group select criteria to select groups of data based on these types of summary values.
So we can use or logic to only select rows where the two summarized values match...
SUM(numberfield,name field)=Count(numberfield, name field)
 
If for some reason a row can have a zero or NULL value in the number field we need to tweak this to make it work which is easy but I hope this makes the concept of the logic clearer.


Edited by DBlank - 14 Sep 2010 at 6:58am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Sep 2010 at 7:00am
I should also point out once you get the selection criteria to work you can suppress the detail section to make your list only show the names and values once (from the group header).
IP IP Logged
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Posted: 15 Sep 2010 at 3:56am
Thank you tons. I may try to do it some myself again this afternoon. My partner's mother-in-law died last night and her mom just died last week. So, she is going to be out for most of the week. 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Sep 2010 at 4:10am
sorry to hear of her losses.
hope you get this worked out and post if you run into problems.
IP IP Logged
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Posted: 15 Sep 2010 at 4:42am
Thank you!
IP IP Logged
<< Prev Page  of 2
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.016 seconds.