I want the output text like below.
"This is an example this is an example this is an example this is an example this is an example this is an
example this is an example this is an example this is an example
This is an example this is an example this is an example this is an example this is an example this is an
example this is an example this is an example this is an example "
This is opposite to the "indent" like
proc report data=try;
column x;
define x / style={indent=0.3in};
run;
unfortunately, I forgot the keyword. Someone can help me out? Thanks a lot.
data a;
length x $1000;
do i=1 to 5;
x=repeat("This is an example ", 6);
x=catx(' ',x,'~n~_~_~_~_~_~_~_',repeat("This is an example ", 14));
output;
end;
run;
ods escapechar='~';
ods rtf file="c:\temp\temp.rtf" ;
proc report data=a nowd missing;
define x/style(column)={asis=on};
run;
ods rtf close;
Or try this one :
data a;
length x $1000;
do i=1 to 5;
x=repeat("This is an example ", 8);
x=catx(' ',x,'~n~{unicode 09}',repeat("This is an example ", 12));
output;
end;
run;
ods escapechar='~';
ods rtf file="c:\temp\temp.rtf" ;
proc report data=a nowd missing;
run;
ods rtf close;
For example below
data a;
length x $1000;
do i=1 to 5;
x=repeat("This is an example ", 20);
output;
end;
run;
ods rtf file=".... ....\try1.rtf";
proc report data=a;
column x;
define x/style={indent=0.3in};
run;
ods rtf close;
The above code produced below figure 1, but I want figure 2. Currently I combined "^R'\li1000\fi-1000'" with data to get figure 2, which makes the data hard to read. I remember SAS has a simple way as I did with "indent" above . Thanks
Figure 1
Figure 2
data a;
length x $1000;
do i=1 to 5;
x=repeat("This is an example ", 6);
x=catx(' ',x,'~n~_~_~_~_~_~_~_',repeat("This is an example ", 14));
output;
end;
run;
ods escapechar='~';
ods rtf file="c:\temp\temp.rtf" ;
proc report data=a nowd missing;
define x/style(column)={asis=on};
run;
ods rtf close;
Or try this one :
data a;
length x $1000;
do i=1 to 5;
x=repeat("This is an example ", 8);
x=catx(' ',x,'~n~{unicode 09}',repeat("This is an example ", 12));
output;
end;
run;
ods escapechar='~';
ods rtf file="c:\temp\temp.rtf" ;
proc report data=a nowd missing;
run;
ods rtf close;
Ksharp, Thanks for your help.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.