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;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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