****************************************************************************************************
****************************************************************************************************
* PROGRAM: output_report.sas
* Created (mm/dd/yyyy): 02/24/2021
*--------------------------------------------------------------------------------------------------
* PURPOSE: This macro drives the calling of each macro to produce a report
* - destination: ODS destination. Valid values: excel or pdf
* - footfontsize = font size for footnotes, typically set as 1 pt smaller than fontsize
* - bordersize = line thickness for top/bottom report lines
*--------------------------------------------------------------------------------------------------
* Sentinel Coordinating Center
* info@sentinelsystem.org
***************************************************************************************************;
%macro output_report(destination = , font=, fontsize=, footfontsize=, bordersize=);
%put =====> MACRO CALLED: output_report;
***************************************************************************************************;
* Set up and initialize report template
***************************************************************************************************;
%report_template(outputtype = &destination., fontsize = &fontsize., font = &font.);
options nodate nonumber orientation = landscape;
%if &destination. = excel %then %do;
ods excel file="&REPORTROOT.output/qrp_report.xlsx" NOGTITLE style = qrp_report_excel
options(embedded_titles="yes"
embedded_footnotes= "yes"
%if &destination. = pdf %then %do;
ods pdf file="&REPORTROOT.output/qrp_report.pdf" NOGTITLE dpi=300 pdftoc=1 style = qrp_report_pdf;
options nodate nonumber orientation=portrait;
/* Counter for figure number */
/* Counter for table number */
***************************************************************************************************;
***************************************************************************************************;
%if &destination. = excel %then %do;
ods excel options(sheet_name="Table of Contents"
ods proclabel = "Table of Contents";
proc report data = tableofcontents nofs nowd headline headskip split="*"
style(report) = {rules = none frame = box borderwidth =1pt bordercolor = black cellpadding=1.75pt};
columns ( "Table of Contents" tabnum caption);
define tabnum / order=data ' ' style(column)=[just=R width=1.1in fontweight=bold textdecoration=underline];
define caption / order=data ' ' style(column)=[just=L];
***************************************************************************************************;
***************************************************************************************************;