🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 11-04-2021 05:07 PM
(1985 views)
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;
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Isn't the limitation because NAME has a length of 200? If you increase that in your first portion does it work?
length name $200;
length name $200;
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Isn't the limitation because NAME has a length of 200? If you increase that in your first portion does it work?
length name $200;
length name $200;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You are right, My bad . Thanks.