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; %let tdate = %sysfunc(date(),mmddyy10.); %let ttime= %sysfunc(time(),timeampm11.); title; /* Clear any existing titles */ options nodate nonumber orientation=landscape papersize=letter topmargin=.25in bottommargin=.25in leftmargin=.25in rightmargin=.25in; /* Generate PDF report */ ods pdf file="&path.\&_USERORG..pdf" notoc style=custom_style startpage=no; /* Create the report */ proc report data=_&Have. nowd; title H=2.0 J=C 'Birth Data Reporting'; title2 H=2.0 J=C color=blue "&_USERORG."; title3 H=3.0 ; title4 H=3.0 J=C F='Arial' "&tdate &ttime"; /* Adjust column widths */ DEFINE CA / STYLE(column)={width=1.5cm}; DEFINE ORG / STYLE(column)={width=1.5cm}; DEFINE LAST_60 / STYLE(column)={width=1.5cm}; DEFINE LAST_60_120 / STYLE(column)={width=1.5cm}; DEFINE LB_2 / 'LB' STYLE(column)={width=1.5cm}; DEFINE UB_2 / 'UB' STYLE(column)={width=1.5cm}; compute ORG; if ORG < LB_2 then call define(_col_, 'style', 'style={background=cyan}'); else if ORG > UB_2 then call define (_col_, 'style', 'style={background=red}'); endcomp; run; ods pdf close;
... View more