Hi,
My rtf output is fine but my pdf has a blank page on the first page (except for footers and header which is coming from a template macro. Anyone know what the issue might be?
rtf:
pd (blank)f:
proc report code:
ods listing close;
ods rtf file = "&analpath.\Output\&outname._&outp..rtf" startpage=no style= TLF_CN_9;
ods pdf file = "&analpath.\Output\&outname._&outp..pdf" startpage=no style= TLF_CN_9;
options orientation=landscape;
%titles_footnotes;
title3 &title3;
footnote1 j=l " ";
proc report data = final1 nowd headline headskip missing split='@' style(header column)=[protectspecialchars=off];
columns ordx1 aebodsys subordx1 total1 aedecod desc
("xxxx @(N=&trtgn1)" TRTxG1 TRTG1) ("xxx @(N=&trtgn2)" TRTxG2 TRTG2) ("xxxx" rd1)
("xxxx @(N=&trtgn3)" TRTxG3 TRTG3) ("xxxx @(N=&trtgn4)" TRTxG4 TRTG4) ("xxxx" rd2);
define ordx1 / descending order order=internal noprint;
define aebodsys / order order=internal noprint;
define subordx1 / descending order order=internal noprint;
define total1 / descending order order=internal noprint;
define aedecod / order order=internal noprint;
define desc /display style(header)=[just=left] style(column)=[asis=on cellwidth=2 in ] flow " ";
define TRTxG1 /display style(header)=[just=center] style(column) = [just=center cellwidth=.8 in] "Events";
define TRTG1 /display style(header)=[just=center] style(column) = [just=center cellwidth=.9 in] "Participants (%)";
define rd1 /display style(header)=[just=center] style(column) = [just=center cellwidth=.75 in] "RD";
define TRTxG2 /display style(header)=[just=center] style(column) = [just=center cellwidth=.8 in] "Events";
define TRTG2 /display style(header)=[just=center] style(column) = [just=center cellwidth=.9 in] "Participants (%)";
define TRTxG3 /display style(header)=[just=center] style(column) = [just=center cellwidth=.8 in] "Events";
define TRTG3 /display style(header)=[just=center] style(column) = [just=center cellwidth=.9 in] "Participants (%)";
define TRTxG4 /display style(header)=[just=center] style(column) = [just=center cellwidth=.8 in] "Events";
define TRTG4 /display style(header)=[just=center] style(column) = [just=center cellwidth=.9 in] "Participants (%)";
define rd2 /display style(header)=[just=center] style(column) = [just=center cellwidth=.8 in] "RD";
compute desc;
if index(desc,' ') = 1 then do;
call define(_col_, "style", "style=[asis=off leftmargin=0.25in]");
end;
if index(desc,' ') = 0 then do;
call define(_col_, "style", "style=[asis=on]");
end;
endcomp;
compute before aebodsys;
line "";
endcomp;
run;
ods rtf close;
ods pdf close;
ods listing;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.