Desktop productivity for business analysts and programmers

ods pdf 2 different reports in same page

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 89
Accepted Solution

ods pdf 2 different reports in same page

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

Accepted Solutions
Solution
‎03-22-2016 03:07 PM
Frequent Contributor
Posts: 89

Re: ods pdf 2 different reports in same page

Posted in reply to learner_sas

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


All Replies
Solution
‎03-22-2016 03:07 PM
Frequent Contributor
Posts: 89

Re: ods pdf 2 different reports in same page

Posted in reply to learner_sas

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.

Contributor
Posts: 27

Re: ods pdf 2 different reports in same page

Posted in reply to learner_sas

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;

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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