Hello,
I have two different projects both can run correctly under HTML, but when _odsdest had values defined as PDF and Word, somehow one can have right Word and PDF file generated and another was only with messy code displayed. I appreciate any help on how to fix the bad one. I compared all SAS macro variables and looked they are the same.
Thank you!
Limin Shu
%macro print;
%if %upcase(&_odsdest) eq PDF %then %do; %let rc = %sysfunc(stpsrv_header(Content-type,application/vnd.pdf)); %let rc = %sysfunc(stpsrv_header(Content-disposition,attachment%str(;) filename=mypdf.pdf)); %let _odsdest=PDF; %end; %else %if %upcase(&_odsdest) eq HTML %then %do; %let _odsdest=html; %end; %else %if %upcase(&_odsdest) eq HTML2WORD %then %do; %let rc = %sysfunc(stpsrv_header(Content-type,application/msword)); %let rc = %sysfunc(stpsrv_header(Content-disposition,attachment%str(;) filename=report.doc)); %let _odsdest=RTF; %end;
%STPBEGIN;
%Super_2pt;
%Plotout;
%STPEND;
%done: %mend print; %PRINT;
... View more