BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
thanikondharish
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

@thanikondharish please mark the correct solution with the solved button. Thanks!

View solution in original post

4 REPLIES 4
ballardw
Super User

@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
Calcite | Level 5
thanq
Reeza
Super User

@thanikondharish please mark the correct solution with the solved button. Thanks!

Reeza
Super User

@thanikondharish please mark the appropriate solution so that any future users who search will see what the correct answer was. 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 4513 views
  • 6 likes
  • 3 in conversation