Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Select First Field Post Reply Post New Topic
Author Message
dirtypotato
Newbie
Newbie
Avatar

Joined: 02 Aug 2012
Location: United States
Online Status: Offline
Posts: 5
Quote dirtypotato Replybullet Topic: Select First Field
    Posted: 14 Aug 2012 at 8:04am
So i am trying to show only one Payor for a service a client received.  Most clients have more than 1 payor, and some payors may be expired.  Here is my example:

ClientID   Service   Service Date  Payor
1              IZ HPV   6/02/11         Blue Cross      
1              IZ HPV   6/02/11         FPEP
1              IZ HPV   6/02/11         No Effective Payor

So basically at the service date the client had 3 payors but only 2 of them were effective (Blue Cross and FPEP).  I only want to show one effective payor, or if all three were not effective and shown as "No Effective Payor", i want it to only show "No Effective Payor" once.

like this:
ClientID   Service   Service Date  Payor
1              IZ HPV   6/02/11         Blue Cross

I've tried using the Minimum formula but it just goes through and repeats Blue Cross 3 times because it starts with the letter b.

Nate
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 15 Aug 2012 at 4:43am
Assuming you're grouping on ClientID, you could try this:
 
1.  Create a formula that will combine any fields that you need to sort the payor you want to display to the top of the payor list for each client.
 
2.  Sort on the formula you just created.
 
3.  Put the payor data in the Client group header field.
 
This way you will only see the "first" payor for each client even though all of the payors are actually in the returned dataset.  Let me know if you have to do any summaries in your report - there's a way to prevent the inflated numbers you'll get in summaries.
 
-Dell
IP IP Logged
dirtypotato
Newbie
Newbie
Avatar

Joined: 02 Aug 2012
Location: United States
Online Status: Offline
Posts: 5
Quote dirtypotato Replybullet Posted: 15 Aug 2012 at 5:50am
Thanks for the advice!  I am definitely in need of doing a summary of only the number of vaccines shown in the groups, but every time i do a count on Service or sum on Price, it does it for all records.  How do i only get it to look at the results in the groups?  
Nate
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 15 Aug 2012 at 6:06am
You'll create running totals for these.
 
Field to Summarize: Whichever field you need to count or sum.
Evaluate for every record
Reset on change of:  Payor group
 
Even though you're only displaying one payor, per client, this should get you the values that you'll need.  Because they're running totals, you'll need to display them in a group footer section (either client or payor) in order to get the correct numbers.
 
-Dell
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.032 seconds.