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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide or Disguise Names in a Pie Chart Legend 1

Status
Not open for further replies.

crogers111

Technical User
Jan 23, 2004
158
0
0
US
CRXI
SQL

I have a report (acutally it's a subreport) that lists the Patient info group footer. The grouping is PatientID which is a unique identifer that inlcudes the SSN thus each row in the report is a different Patient and generally only a few patients will appear.

SAMPLE OF OUTPUT:

PatientName AmountPaid
Sally Jones $ 9,000
Joe Smith $ 8,500
Tom Wilson $ 5,800

There is a Pie Chart in the Report Header that shows a slice for each patient.

PROBLEM: The report users have asked for a prompt/parameter to allow the names to be hidden or disguised from the report at runtime if so desired. I have created the parameter and can suppress the Patient Names in the footer, but how do I hide or disguise the names in the Pie Chart Legend so that the legend still displays with the colors and amounts but only the names are changed ?

ATTEMPTS:

-Creating a runnning total formula and identifying each patient as 'Patient 1' 'Patient 2', 'Patient 3' instead of their name...but since a RT is a print time formula I can't chart on it in my subreport.


-I tried using a formula that makes the patient name blank/empty string but then all patients have the same blank name and are displayed as 1 in the chart

- I created a blank text box and made the background all white. I tried to use this to cover the legend area of the names and have it conditionally suppressed based on the parameter. Unfortunately, the legend appears to grow horizontally based on the name lengths. This option works if I want to hide the entire Legend but I need to only hide/disguise the names and still show the color block and amount.



I'm open to a formula that would scramble the SSN, Patient Name other ID field if the parameter to hide was selected and thinking this is the way I need to go. I would need to ensure each Patient was a unique.

Any other thoughts on how to accomplish this or a formula for scrambling a text string would be much appreciated !







 
This is a formula that we use to anonymise names. It doesn't scramble the patient ID but you could easily remove it from the formula if necessary.

select{?anonymize}
case 'N' : {patients.surname}+' '+{patients.Firstname}+' '+cstr({patients.patient_ID})//[1]
case 'Y' :{patients.surname}[1]+'xxxx '+{patients.Firstname}[1]+'yyyy '+cstr({patients.patient_ID})
default :{patients.surname}[1]+' '+{patients.Firstname}[1]+cstr({patients.patient_ID})
 
Thanks for the reply. This seems like a good idea but I don't think it will work for my scenario.

Unfortunately the ID should not be displayed and if I remove it from your formula, patients with the same beginning letter in their first and last name are grouped as 1 in the chart. (e.g. Tom Smith and Terry Simpson get grouped as 1 slice in the chart)

I'll play around with your formula and maybe I can come up with a way to scramble the ID and then it might work for me.

I'm open to any other suggestions as well.

Thanks again.

 
is the patient ID numeric?
if so, i would multiply it by some odd number (such as 3.156246771) so that they remain unique but do not appear to be ID #s.
 
It seems you are grouping on PatienceId and creating a pie chart. What about using GroupNumber to identify each Patient

select{?anonymize}
case 'N' : {patients.surname}+' '+{patients.Firstname}+' '+cstr({patients.patient_ID})//[1]
case 'Y' : "Patient "+GroupNumber
default :"Patient "+GroupNumber
 
poujou,

You nailed this (*). I looked at this and couldn't see the forest for the trees. The only change I would suggest is that you would have to convert groupnumber totext like this:

select{?anonymize}
case 'N' : {patients.surname}+' '+{patients.Firstname}+' '+cstr({patients.patient_ID})//[1]
case 'Y' : "Patient "+ totext(GroupNumber,0,"")
default : "Patient " + totext(GroupNumber,0,"")

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top