hello,
i use the proc report to display data of sas dataset in RTF/PDF
same value of columns contain a blank spaces character in the beginning of data followed by other printable characters
we can replace the blank byte(32) by Non-breaking space byte(160) but the length of the space is not the same in the output
is there an option or any way to do that ?
bellow a sas example :
data test ;
a=' aaaaaa'; output ;
a=' bbbbbb'; output ;
a=' cccccc'; output ;
run ;
ods rtf ;
proc report data=test ;
column a ;
run ;
ods rtf close ;
best regard
To preserve leading spaces in your text, you will want the little document asis=on option:
data test ;
a=' aaaaaa'; output ;
a=' bbbbbb'; output ;
a=' cccccc'; output ;
run ;
ods rtf ;
proc report data=test ;
column a style(column)={asis=on};
run ;
ods rtf close ;
The most likely cause is the use of a proportional font. You could use an ods style that uses a monospace type font such as Courier or SAS Monospace.
Depending on exactly what you need to do there may be other options to control justification. If the intent is to create indented text then adding spaces often does exactly what you describe.
To preserve leading spaces in your text, you will want the little document asis=on option:
data test ;
a=' aaaaaa'; output ;
a=' bbbbbb'; output ;
a=' cccccc'; output ;
run ;
ods rtf ;
proc report data=test ;
column a style(column)={asis=on};
run ;
ods rtf close ;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.