The SAS Output Delivery System and reporting techniques

indentation on long terms in table

Reply
Super Contributor
Posts: 328

indentation on long terms in table

In the picture below, we have some long terms and want to indent them as indicated by the red mark. 

Any idea how to do it in SAS? 

One idea is to generate a new variable, adding some split characters within the long term based on the width of the column. 

 

Capture.PNG

Super User
Posts: 12,996

Re: indentation on long terms in table

Posted in reply to fengyuwuzu

First, where is this? In a data set or report output? If report output which procedure? If this is not going to an ODS destination such as HTML, RTF or PDF you may have a lot of work cutout. You might be able in a report procedure to force what looks like an indent with

a style PADDINGLEFT option. See this brief example using proc print output.

data junk;
   infile datalines dlm='|' truncover;
   length longline $100.;
   input longline value ;
datalines;
   This is a longish line that starts with some spaces.| 124
   As does this line also. Note that I have no special character in the data.|456
This line does not have any leading spaces which are removed by report procedures.| 678
;
run;

proc print data=junk noobs;
   title "Default print";
   var longline /style=[width=1.5in];
   var value;
run;title;

proc print data=junk noobs;
   title "Style option Paddingleft added";
   var longline / style=[width=1.5in paddingleft=.1in ];
   var value;
run;title;

 

 

Is there a specific rule involved that the lines starting with "non-compliance" "regulation" "source" or "match" are not indicated?

 

It appears as though "Missing or out of Window" "Entered study but subject did not satisfy entry criteria" "Other"  are actually group headers and not variable values. Is that actually the case.

 

BTW PICTURES are the only data interchange form worse than spreadsheet files. At least we can copy and paste an paste from spreadsheets (if we are willing to open them).

Super Contributor
Posts: 328

Re: indentation on long terms in table

[ Edited ]

Thank you Ballardw.

 

I cut from a table, a PDF file produced from proc report. I will look at the option PADDINGLEFT.

 

 

Ask a Question
Discussion stats
  • 2 replies
  • 111 views
  • 0 likes
  • 2 in conversation