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 ;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.