I am trying to print the observation that is character length bigger than 200. I tried the following but it won't print because its cutoff in dataset itself. I want to achieve it using compute block but its not aligning with other columns. For example in the example, name got cutoff when I use it as observation , if I use in compute block its not aligning with sex and age. How can I achieve having full name and align with other columns. I am aware of I can spit the length using escape character to avoid getting into other column. Any help really appreciated. Thanks.
data class ; length name $200; set sashelp.class; x=_n_; if x=1; if name= 'Alfred' then name=" this is very long variable length bigger than the 200 character how to print this in the proc report , I am having difficulty to achieve it, Can you please help. I really appreciate your help may be I missing something here or forgot how to achieve it"; run; title ' '; footnote ''; options orientation = landscape errors = 2 missing = ' ' nofmterr ls = 175 validvarname = upcase nofmterr nobyline; ods escapechar = '^'; ods results on; ods listing close; ods rtf file = "&tmplocation.\xx.rtf" style = table_rtf; proc report data = class ls = 145 ps = 55 split = "?" headline center missing formchar(2) = '_'; ** titles **; ** report **; column ("^R/RTF'\brdrb\brdrs '" name sex age); define name / group order = internal style(header) = [just=l] style(column) = [just=l vjust=b cellwidth=35.0% asis=on] "name " ; define age / group order = internal style(header) = [just=l] style(column) = [just=l vjust=b cellwidth= 5.0% asis=on] "age" ; define sex / group order = internal style(column) = [just=c vjust=b cellwidth= 8.6% asis=on] "sex" ; compute before name; /* line @1 'this is very long variable length bigger than the 200 character how to print this in the proc report , I am having difficulty to achieve it, Can you please help. I really appreciate your help may be I missing something here or forgot how to achieve it';*/ endcomp; run; ods rtf close;
You are right, My bad . Thanks.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.