Hi: The problem with options like WRAP and FLOW is that they are LISTING-only options. The OP said that PDF was needed. If you just make your long variable, ODS PDF will try to do the best it can and will automatically wrap. But you can use the CELLWIDTH style attribute to alter the width of the cell and how the value "flows". See the attached screenshot. It was produced with the code below. If the long text string did have spaces, then the text inside the cell would have flowed a bit differently, ODS will try to break the line at a space or punctuation character, if possible. cynthia data makelong; set sashelp.class; length longvar1 longvar2 $1000 tmp $100; keep name longvar1 longvar2; where name in ('Alfred','Alice'); tmp = catt('aaaaaaaaaabbbbbbbbbbcccccccccc', 'ddddddddddeeeeeeeeeeffffffffff', 'gggggggggghhhhhhhhhh', 'iiiiiiiiiijjjjjjj--Z'); ** make longvar1 and longvar2 exactly 1000 characters; longvar1 = repeat(tmp,99); longvar2 = longvar1; lg = length(longvar1); put lg=; output; run; options orientation=landscape topmargin=.5in bottommargin=.5in leftmargin=.5in rightmargin=.5in; ods listing close; ods pdf file='c:\temp\compare_cellwidth.pdf'; ** cellpadding puts a bit more white space around; ** the long text, making it easier to read; proc report data=makelong nowd style(report)={cellpadding=6pt}; title '2) Use CELLWIDTH attribute for PDF to adjust size of LONGVAR cell'; column name longvar1 longvar2; define name /order; define longvar1 / display style(column)={cellwidth=2in}; define longvar2 / display style(column)={cellwidth=4in}; compute after name; line ' '; endcomp; run; ods _all_ close; title;
... View more