%macro trial(investor,type); ODS TAGSETs.ExcelXP options(sheet_interval='Table' sheet_name="&investor &type" center_horizontal="yes" fittopage="No" blackandwhite="Yes" Embedded_Footnotes='Yes' Embedded_Titles='Yes' autofit_height='Yes' orientation='landscape' absolute_column_width='7' Frozen_Headers='3'); proc report data=trial4 wrap style(column)={JUST=CENTER}; where investor = "&investor" and type = "&type"; columns LN_NO investor LM_TEMPLATE_NM s323_dt; title justify=left "Report as of &rpt_dt"; FOOTNOTE1 justify=Left Height=8pt "&FNote1"; FOOTNOTE2 justify=Left Height=8pt "&FNote2"; RUN; %mend; %trial(FHA,IN TRIAL); %trial(FHA,TRIAL ON STREET); %trial(FHLMC,IN TRIAL); %trial(FHLMC,TRIAL ON STREET); %trial(FNMA,IN TRIAL); %trial(FNMA,TRIAL ON STREET); %trial(PRIVATE / REG AB,IN TRIAL); %trial(PRIVATE / REG AB,TRIAL ON STREET); For this report output the investor represents the example (ie FHA,FHLMC) and the Type is represented by examples (IN TRIAL or TRIAL ON STREET). Since this passes a macro and puts each in a separate tab based on the investor I want to show the s323_dt only if the Investor = ‘FHA’, not the others. I know I could create t separate dataset just for FHA however I want to handle this within the macro
... View more