Hello Everybody,
I want to create one table and one graph in the same page of PDF output. I found SAS program
options nodate nonumber;
ods pdf file='LayoutGriddedTitles.pdf';
title 'This is TITLE1'; footnote 'This is FOOTNOTE1';
ods layout gridded; ods region; title 'This is the REGION TITLE'; footnote 'This is the REGION FOOTNOTE'; proc print data=sashelp.class(obs=10); run;
goptions hsize=4in vsize=4in; proc gchart data=sashelp.class; vbar age / name='gtitle'; title 'This is the PROCEDURE TITLE'; footnote 'This is the PROCEDURE FOOTNOTE'; run; quit;
ods layout end; ods pdf close;
. My result output in SAS EG result window looks fine but output file "LayoutGridedTitles.pdf" has two pages. Should not I get 1 page output rather than 2 here. I am wondering what did I miss here.
Something to add here. I have warning in log which says .
"WARNING: Unsupported device 'SASEMF' for TAGSETS.SASREPORT13(EGSR) destination. Using default device 'PNG'." is that the reason.
Something to add here. I have warning in log which says .
"WARNING: Unsupported device 'SASEMF' for TAGSETS.SASREPORT13(EGSR) destination. Using default device 'PNG'." is that the reason.
I'm not sure if you got this working yet or not. I have the following code between my ods pdf code that works and puts it all on one page of my pdf.
TITLE1 "Profile of all Students, <ERM. &YEAR5. to <ERM. &YEAR1.";
TITLE2 'Gender';
FOOTNOTE1;
PROC TABULATE
DATA=WORK.DEMO_&STERM._ALL;
VAR TOTAL;
CLASS TERM/ ORDER=UNFORMATTED MISSING;
CLASS SEX / ORDER=UNFORMATTED MISSING;
TABLE
SEX={LABEL=''}
all = 'Total' ,
TERM={LABEL=''} *(TOTAL={LABEL=''} * N={LABEL="#" S=[CELLWIDTH=.5in]}*f=comma6. TOTAL={LABEL=''}
* ColPctN={LABEL="%" S=[CELLWIDTH=.5in]}*f=pctfmt. );;
FORMAT SEX $SEX.;
RUN;
RUN; QUIT;
ods startpage=no;
/* GENDER TREND CHART */
PROC SGPLOT DATA=WORK.&STERM._GENDER noborder;
VBAR TERM / GROUP = SEX RESPONSE = PERCENT DATALABEL=PERCENT DATASKIN=PRESSED;
YAXIS LABEL = ' ';
XAXIS LABEL = ' ';
TITLE 'Percent of Enrollment';
DISCRETELEGEND / TITLE='';
FORMAT SEX $SEX.;
RUN;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.