ods path (prepend) work.template(update) sashelp.tmplmst;
proc template;
define style custom_style;
parent=styles.pearl;
style Document /
margin=0.3in;
style Table /
bordercolor=cxB0B7BB
borderwidth=0.5pt
borderstyle=solid;
class Header /
backgroundcolor=lightblue height=40; /* Optional: Change header background color */
class fonts /
'TitleFont' = ("<MTsans-serif>, Albany",14pt,bold)
'TitleFont2' = ("<MTsans-serif>, Albany",14pt,medium italic)
'docFont' = ("<MTsans-serif>, Albany",8pt);
end;
run;
title;
options nodate nonumber orientation=landscape papersize=letter topmargin=.25in bottommargin=.25in leftmargin=.25in rightmargin=.25in;
/* Generate PDF report */
ods pdf file="&path.\dummy..pdf"
notoc
style=custom_style
startpage=no;
/* Create the report */
proc report data=sashelp.class;
columns sex name ;
compute name;
if sex='F' then call define(_col_,'style', 'style={background=pink}');
else if sex='M' then call define(_col_, 'style', 'style={background=cyan}');
endcomp;
run;
ods pdf close; /* Close the PDF destination */
And the question is what exactly?
@sum_sand wrote:
ods path (prepend) work.template(update) sashelp.tmplmst;
proc template;
define style custom_style;
parent=styles.pearl;
style Document /
margin=0.3in;
style Table /
bordercolor=cxB0B7BB
borderwidth=0.5pt
borderstyle=solid;
class Header /
backgroundcolor=lightblue height=40; /* Optional: Change header background color */
class fonts /
'TitleFont' = ("<MTsans-serif>, Albany",14pt,bold)
'TitleFont2' = ("<MTsans-serif>, Albany",14pt,medium italic)
'docFont' = ("<MTsans-serif>, Albany",8pt);
end;
run;
title;
options nodate nonumber orientation=landscape papersize=letter topmargin=.25in bottommargin=.25in leftmargin=.25in rightmargin=.25in;/* Generate PDF report */
ods pdf file="&path.\dummy..pdf"
notoc
style=custom_style
startpage=no;/* Create the report */
proc report data=sashelp.class;
columns sex name ;
compute name;
if sex='F' then call define(_col_,'style', 'style={background=pink}');
else if sex='M' then call define(_col_, 'style', 'style={background=cyan}');
endcomp;run;
ods pdf close; /* Close the PDF destination */
Key explaining colors - what each color represents.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.