Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chart Legend needs to show names instead of IDs

Status
Not open for further replies.

crogers111

Technical User
Jan 23, 2004
158
US
CR XI
SQL

SAMPLE DATA:

FName LName SSN DependentNum Paid
John Smith 123456789 0 300
John L Smith 123456789 0 400
Joe Wilson 987654123 0 200
Jennny Smith 123456789 1 600

The first 2 rows are the same person with different entries for LName

Formula to uniquely identify and group each person:

@PatientID
SSN & DependentNum

Formula for Chart:

@PatientThreshold
if Sum ({Command.AmountPaid}, {@PatientID}) >= {?PaidThreshold} then
{@PatientID} else
"Other"

Report is grouped on PatientID.

There is a pie chart where:

On change of = @PatientThreshold
Show Value = Sum of Paid

PROBLEM:

The legend in the chart shows the @PatientID which is the SSN&DependentNum and I need it to show the Fname & LName.

Is there a way to group on @PatientID but display the FName & LName in the Chart's Legend
 
I believe I have figured this out....

I created the following formula:

@Patient Name
Maximum({Command.DEP_FirstName},{@Patient ID}) & " " & Maximum({Command.DEP_LastName},{@Patient ID})

I then tweaked the existing formula to display @PatientName instead of @PatientID

@PatientThreshold
if Sum ({Command.AmountPaid}, {@PatientID}) >= {?PaidThreshold} then
{@Patient Name} else
"Other"

So I kept my grouping on @PatientID but am now displaying the Patient Name which is the Maximum value for each @PatientID.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top