Hello,
I want the output in my Excel and PDF to look like this -
title1 |------|
title2 |IMG|
title3 |------|
I looked up the forum and SAS Notes but the posts seem to be close but not exactly what I want.
Sample 41703: How to wrap text to the right of an image in a title or footnote in an ODS PDF file
Usage Note 24229: Can I get images in my titles with ODS PRINTER?
This thread comes close -
http://support.sas.com/forums/thread.jspa?messageID=44150걶
But I want this trick to work to both in Excel and PDF and I am not sure how to design the Title statement for this. The code (we are running Stored Processes) is here -
%macro header;
%IF &format = Excel %THEN %DO; %LET _ODSDEST =tagsets.excelxp ; %LET _ODSSTYLE =; %LET _ODSSTYLESHEET = ;
%LET _ODSOPTIONS =options(
embedded_titles="yes"
autofilter="3-46"
frozen_headers="13"
/*frozen_rowheaders="2"*/
absolute_column_width="8.3,11,7,9,8,8"
autofit_height="yes"
/*autofit_width="no"*/
sheet_label="test"
/*wraptext="yes"*/
/*(mergecell="yes"*/
);
RUN;
DATA _NULL_; rc = STPSRV_HEADER('Content-type', 'application/vnd.ms-excel');
rc = STPSRV_HEADER('Content-disposition', 'attachment; filename=tmp.xls');
RUN; %END;
%ELSE %IF &format = PDF %THEN %DO; %LET _ODSDEST = pdf; %LET _ODSSTYLE = styles.pdftemp; %LET _ODSSTYLESHEET = ; %LET _ODSOPTIONS = BOOKMARKGEN=NO COMPRESS=9 STARTPAGE=NO; DATA _NULL_; rc = STPSRV_HEADER(
'Content-type', 'application/pdf');
rc = STPSRV_HEADER('Content-disposition', 'attachment; filename=Test_op_prgm_smry.pdf'); RUN; %END ;
%ELSE %IF &format = %THEN %DO; %LET _ODSDEST = ; %LET _ODSSTYLE = ; %LET _ODSSTYLESHEET = ; %LET _ODSOPTIONS = ; DATA _NULL_; rc = STPSRV_HEADER('Content-type', 'application/vnd.ms-excel');
rc = STPSRV_HEADER('Content-disposition', 'attachment; filename=Test_op_prgm_smry.xls'); RUN; %END;
%ELSE %IF &format = HTML %THEN %DO; RUN; %END;
%mend;
%header;
ods escapechar='^';
title j=left HEIGHT=3 COLOR=BLACK FONT=verdana 'Online Summary' j=c "^S={preimage='/sasdev/../logo.bmp'}";
title2;*not including the entire line of code;
title3;
If I can get the trick for PDF alone, that also works for me.
Thanks,