data have ;
length type $ 30 ;
type='benze';
cost=3455454 ;output ;
type=' group1' ;
cost=2542345 ;output ;
type=' group2' ;
cost=452344 ;output ;
run;
ods rtf file='D:\ss\ss.rtf' ;
proc report data=have nowd ;
run;
ods rtf close ;
i create one dataset like above if i proc report like above it give rtf file like see below
type |
cost |
benze |
3455454 |
group1 |
2542345 |
group2 |
452344 |
but i want to data has some leading spaces like below
type |
cost |
benze |
3455454 |
group1 |
2542345 |
group2 |
452344 |
@thanikondharish please mark the correct solution with the solved button. Thanks!
@thanikondharish wrote:
data have ;
length type $ 30 ;
type='benze';
cost=3455454 ;output ;
type=' group1' ;
cost=2542345 ;output ;
type=' group2' ;
cost=452344 ;output ;
run;ods rtf file='D:\ss\ss.rtf' ;
proc report data=have nowd ;
run;
ods rtf close ;i create one dataset like above if i proc report like above it give rtf file like see below
type
cost
benze
3455454
group1
2542345
group2
452344
but i want to data has some leading spaces like below
type
cost
benze
3455454
group1
2542345
group2
452344
You want to add style control as follows:
proc report data=have nowd ; define type/ display style=[asis=on]; run;
ASIS=on tells the ODS display to maintain leading spaces.
@thanikondharish please mark the correct solution with the solved button. Thanks!
@thanikondharish please mark the appropriate solution so that any future users who search will see what the correct answer was.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.