Help using Base SAS procedures

Anomalous behaviour of a Greek character

Reply
Frequent Contributor
Posts: 95

Anomalous behaviour of a Greek character

[ Edited ]

Hi,

 

I'm trying to write a report as a PDF that includes a Greek character (mu) for microgram. All looks well in the output window, but when the PDF is generated things get messy.

 

Here is some code to describe what I'm talking about:

 

 

data medication;

length drug $25;

input patient $ drug $ route dose units;

datalines;

GWa Aripiprazole 3 9.75 1

JAd Adalimumab 2 40 1

TJe Esomeprazole 1 40 1

JMa Rosuvastatin 1 10 1

JMo Etanercept 2 50 1

JQA Salmeterol 5 50 4

AJa Infliximab 4 100 1

MVB Insulin 2 10 5

WHH Filgrastim 2 15 4

JTy Glatiramer 2 20 1

JKP Rituximab 4 50 1

ZTa Tiotropium 5 18 4

MFi Sitagliptin 1 25 1

;

proc format;

value unit

1 = 'mg'

2 = 'g'

3 = 'ml'

4 = '~{unicode 03BC}g'

5 = 'other'

;

value route

1 = 'oral'

2 = 'subcu'

3 = 'IM'

4 = 'IV'

5 = 'inhaled'

6 = 'nasal'

7 = 'transdermal'

8 = 'eye'

9 = 'other'

;

run;

ods pdf

author = "POTUS"

title = "Report of Medications"

style=Pearl

pdftoc = 1

uniform

/* file="C:\Users\XXX\GreekTest.pdf" */

;

options orientation=portrait nonumber nodate missing='' ;

options dtreset;

ods listing close;

ods escapechar='~';

title j=c "Table of Medications ";

proc report data=medication nowd headline headskip formchar (2)="_" spacing=2 split='|' style(report)=[fontsize=8pt] ;

column

patient

drug

dose

units

route

;

define patient / order style(column)= [ cellwidth=2.5cm] "Patient Identifier";

define drug / style(column)= [just=left cellwidth=3.5cm] "Medication";

define dose / style(column)= [just=center cellwidth=2.2cm] "Dose" ;

define units / style(column)= [just=left cellwidth=2.2cm] "Units" format=unit.;

define route / style(column)= [just=right cellwidth=2.2cm] "Route" format=route.;

run;

 

Here is the view of the table from the output window:

 

OutputTable.PNG

 

And here is the table in the PDF:

 

PDFTable.PNG

 

Why are the units no longer aligned?

 

SAS v9.4 running in Windows 7 x64

 

Norman.

Norman.
SAS 9.4 (TS1M4) X64_7PRO WIN 6.1.7601 Service Pack 1 Workstation

Super User
Posts: 19,770

Re: Anomalous behaviour of a Greek character

Is it your PDF viewer? I'm assuming Adobe, it doesn't always play nicely with symbols, there's something about embedding fonts I had to deal with once for something like this. 

Frequent Contributor
Posts: 95

Re: Anomalous behaviour of a Greek character

Interesting idea, but how do I test it?

 

I've attached the file.

 

Norman.

Norman.
SAS 9.4 (TS1M4) X64_7PRO WIN 6.1.7601 Service Pack 1 Workstation

Ask a Question
Discussion stats
  • 2 replies
  • 271 views
  • 0 likes
  • 2 in conversation