- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi...
I am working on AE table.
working on SAS studio.
I need to place 3 blank spaces before "Preferred Term" in column header (screen print below).
but, macro variable with blank space is not working with SAS studio, also with "\li300" option.... "System Organ Class" also move 3 space left.
any suggestion please.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
data have; do i=1 to 20; col='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; output; end; stop; keep col; run; ods rtf file='c:\temp\temp.rtf' style=journal bodytitle; proc report data =have nowd split = '#' ; column col ; define col / 'System Organ Class# Preferred Term' style(header)={just=l asis=on} ; run; ods rtf close
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Proc report code as a minimum as we need to know all the options you are currently using that might affect that appearance.
Better is to include example data in the form of a data step as well so we can actually test code suggestions.
Any code that includes macro variables needs to include the definition/values of the macro variables. And did you have code that worked as desired before adding in macro variables? If not, then the macro variables adds complexity to the problem.
Please not that "indent 3 spaces" is 1) very flexible in meaning as proportional fonts display spaces at different widths and 2) do you mean to have the second bit centered?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am not sure if there is any option in Proc report that aligns column headers as per your requirement.
However, there is a workaround , which I find quite handy -
Inserting Invisible characters in the program code, to adjust the header 3 spaces left - Press and hold “Alt” key and while holding it, type digit keys 255 at the numeric keypad . The inserted characters will be exactly like blank spaces (Repeat 3 times in your case) . The report output will honor them as valid characters and display them as spaces.
https://www.lexjansen.com/nesug/nesug04/pm/pm24.pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@r_behata wrote:
I am not sure if there is any option in Proc report that aligns column headers as per your requirement.
However, there is a workaround , which I find quite handy -
Inserting Invisible characters in the program code, to adjust the header 3 spaces left - Press and hold “Alt” key and while holding it, type digit keys 255 at the numeric keypad . The inserted characters will be exactly like blank spaces (Repeat 3 times in your case) . The report output will honor them as valid characters and display them as spaces.
https://www.lexjansen.com/nesug/nesug04/pm/pm24.pdf
To force where the label goes to the second line would also likely require the SPLIT option character. Still say we need to see the existing Proc Report code to make sure this is viable. Note the phrase in the question:
but, macro variable with blank space is not working with SAS studio, also with "\li300" option.... "System Organ Class" also move 3 space
Macro variable(s) where of what content, the "\li300" appears to be attempting to use RTF (?) raw codes and not clue what "System Organ Class" refers to. There is a lot stuff possible in the code that we would need to see.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
proc report data = &data. headline nowd split = '#' missing ps=30
style ( report )= [frame=hsides rules=groups outputwidth=9in background = white ]
style ( header ) = [ protectspecialchars = off] nowindows ;
column fcol ;
by pgby;
define fcol / "System Organ Class# Preferred Term"
style = [ just = left cellwidth = 0.9in protectspecialchars = off background = white ]
style ( header ) = [ just = left ] ;
This piece of code I am using.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
data have; do i=1 to 20; col='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; output; end; stop; keep col; run; ods rtf file='c:\temp\temp.rtf' style=journal bodytitle; proc report data =have nowd split = '#' ; column col ; define col / 'System Organ Class# Preferred Term' style(header)={just=l asis=on} ; run; ods rtf close