Hi,
I'm trying to create demographics table. For alignment purpose I'm using a macro described in following paper.
http://www.pharmasug.org/proceedings/2013/CC/PharmaSUG-2013-CC15.pdf
My problem is, I'm able to get aligned values in dataset but when I'm using proc report to output in ODS rtf, all the leading blanks, used for alignment are lost. I tried using other characters like << instead of blanks and it's working fine. Looks like only blanks has some problem. I also tried style(column)={asis=on}; but still its removing all leading blank spaces.
Please help!
Hi,
This is something I do alot and asis=on should work fine. Try the code below, make sure you have put the asis in the right place, and that the spaces are actually in the data - i.e. is there something triming or stripping the data:
data have; a="Abcd"; output; a=" Defg"; output; run; ods rtf file="s:\temp\rob\tmp.rtf"; proc report data=have nowd; columns a; define a / style(column)={asis=on}; run; ods rtf close;
HI!
This code will not work for RTF. ASIS=ON applicable for LISTING and HTML outputs.
Have a look at your tmp.rtf file.
BRGDS,
Crow
This code works exactly as it is intended producing the output shown in the picture
which is correct with spacing presented. It is also widely documented as being used in RTF by other people such as:
https://www.lexjansen.com/phuse/2007/cs/CS08.pdf
Please avoid re-opening 3.5 year old threads just to post incorrect information.
It may help to show exactly how you made your data, some example data and the whole code for that example data that you attempted and what isn't quite working.
It would also help to show exactly how you would desire the output to look for the example data.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.