Hi, You can also use escape codes to achieve the same effect: data have; attrib Year Question AnsCode AnsText QType format=$200.; infile datalines delimiter=","; input year $ question $ anscode $ anstext $ qtype $; datalines; 2010,"Is this the test 1?",1,"Yes","Intro" 2010,"Is this the test 1?",2,"No","Intro" 2010,"Is this the test 1?",3,"N/A","Intro" 2010,"Is this the test 2?",1,"Yes","Sec1" 2010,"Is this the test 2?",2,"No","Sec1" 2010,"Is this the test 2?",3,"N/A","Sec1" 2014,"Is this the test 3?",1,"Yes","Intro" 2014,"Is this the test 3?",2,"No","Intro" 2014,"Is this the test 3?",3,"N/A","Intro" ; quit; data inter (keep=outline); set have; attrib outline format=$2000.; by year; if first.year then outline=strip(year)||"^n "||strip(qtype)||"^n "||strip(question)||"^nCODES:^n "||strip(anscode)||" "||strip(anstext); else outline=" "||strip(anscode)||" "||strip(anstext); run; ods escapechar="^"; ods pdf file="s:\temp\rob\test.pdf"; proc report data=inter nowindows style(column)=[just=l borderrightcolor=white borderleftcolor=white bordertopcolor=white borderbottomcolor=white]; define outline / style(column)=[width=8cm asis=on]; run; ods pdf close;
... View more