BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
learner_sas
Quartz | Level 8

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;

from http://support.sas.com/documentation/cdl/en/odsug/67921/HTML/default/viewer.htm#p06ji2uhvayhq5n1eik2...

. 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.

 

 

 

 

 


OutputInSASWindow.PNG
1 ACCEPTED SOLUTION

Accepted Solutions
learner_sas
Quartz | Level 8

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.

View solution in original post

2 REPLIES 2
learner_sas
Quartz | Level 8

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.

laura6728
Obsidian | Level 7

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, &LTERM. &YEAR5. to &LTERM. &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;

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3575 views
  • 0 likes
  • 2 in conversation