LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2005, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 21 Mar 2005 12:10:41 +0100
Reply-To:     Andre Wielki <wielki@INED.FR>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Andre Wielki <wielki@INED.FR>
Subject:      Re: Qn.  on  ODS]
Comments: To: Jeff Morison <jmt_mtf@YAHOO.COM>
Content-Type: text/plain; charset=windows-1252; format=flowed

Jeff Morison wrote about two weeks ago: on a SINGLE PAGE in RTF or PDF document format containing the following

> 1. AE (Adverse Events) data listing. > 2. Lab data listing. > 3. One Efficacy summary table. > 4. Two individual graphs. > > I was wondering if any one has done such thing using > ODS, inserting multiple outputs on a single page. > > Most of these pts. have max of 4 observations per > output. We can comprimise a bit on the font size to > fit all of them in a page. > > We are on XP SAS Version 9.1

I was offering him a classical ods pdf solution mentioning that with ods document and hand manipulation into the document window i obtain a lot of pages (one for each object)

To avoid those page skip i reconsider the way i worked with document

In order to furnish the table to other test, please send me a mail! *================ first pgm creating cerealdoc=========; libname test "d:\"; options papersize=a4 nodate; proc sort data=test.cereals;by Fiber_gr;run; ods listing close; ods document name=test.cerealdoc ; ods proclabel 'list of cereals'; proc print data=test.cereals(keep= name fiber_gr obs=10); var name;by fiber_gr; run; proc means data=test.cereals mean min max; var sodium sugars potassiu; run; quit; * graphic creation at the bottom of a page and side by side ; goptions reset=all ; ods noptitle; goptions hsize=8 cm vsize=5 cm target=jpeg devmap=winansi keymap=winansi colors=(none) ctitle=black horigin=9.5 cm vorigin= 1 cm; proc gplot data=test.cereals;by fiber_gr; plot calories * fat; run; quit; ods noptitle; goptions hsize=8 cm vsize=5 cm target=jpeg devmap=winansi keymap=winansi colors=(none) ctitle=black horigin=0.5 cm vorigin= 1 cm; proc gplot data=test.cereals;by fiber_gr; plot sodium * potassiu; run; quit; ods document close; ods listing;

*============ first way of output =======; proc document name=test.cerealdoc; list/levels=all; run; quit; ods listing close; ods pdf file="d:\new3pages.pdf"; ods pdf startpage=never; proc document name=test.cerealdoc; replay \Print#1\ByGroup1#1\Print#1; replay \Means#1\Summary#1; replay \Gplot#1\ByGroup1#1\Gplot#1; replay \Gplot#2\ByGroup1#1\Gplot3#1; run;quit; ods pdf startpage=now; ods pdf startpage=never; proc document name=test.cerealdoc; replay \Print#1\ByGroup2#1\Print#1; replay \Means#1\Summary#1; replay \Gplot#1\ByGroup2#1\Gplot1#1; replay \Gplot#2\ByGroup2#1\Gplot4#1; run;quit; ods pdf startpage=now; ods pdf startpage=never; proc document name=test.cerealdoc;

replay \Gplot#1\ByGroup3#1\Gplot2#1; replay \Gplot#2\ByGroup3#1\Gplot5#1; run;quit; ods pdf close; ods listing;

the pdf output has only two pages and the graphics are at bottom but on each other left!

*============= second try output with ods layout===;

proc document name=test.cerealdoc; list/levels=all; run; quit; ods listing close; ods pdf file="d:\newcorrectpages.pdf"; ods pdf startpage=never;*1rst page; proc document name=test.cerealdoc; replay \Print#1\ByGroup1#1\Print#1; replay \Means#1\Summary#1; run;quit; ods layout start columns=2; proc document name=test.cerealdoc; replay \Gplot#1\ByGroup1#1\Gplot#1; replay \Gplot#2\ByGroup1#1\Gplot3#1; run;quit; ods layout end; ods pdf startpage=now; *second page; ods pdf startpage=never; proc document name=test.cerealdoc; replay \Print#1\ByGroup2#1\Print#1; replay \Means#1\Summary#1; run;quit; ods layout start columns=2; proc document name=test.cerealdoc; replay \Gplot#1\ByGroup2#1\Gplot1#1; replay \Gplot#2\ByGroup2#1\Gplot4#1; run;quit; ods layout end; ods pdf startpage=now; *third page; ods pdf startpage=never; ods layout start columns=2; proc document name=test.cerealdoc; replay \Gplot#1\ByGroup3#1\Gplot2#1; replay \Gplot#2\ByGroup3#1\Gplot5#1; run;quit; ods layout end; ods pdf close; ods listing;

the pdf result show 3 pages the two graphics centered the second under the first and of bad quality because narrower and in red!

*============== alternate production of graphs as javaimg==;

libname test "d:\"; options papersize=a4 nodate; proc sort data=test.cereals;by Fiber_gr;run; ods listing close; ods document name=test.cerealdoc2 ; ods proclabel 'list of cereals'; proc print data=test.cereals(keep= name fiber_gr obs=10); var name;by fiber_gr; run; proc means data=test.cereals mean min max; var sodium sugars potassiu; run; quit;

goptions reset=all dev=javaimg; ods noptitle; goptions hsize=8 cm vsize=5 cm target=jpeg devmap=winansi keymap=winansi colors=(none) ctitle=black ; proc gplot data=test.cereals ;by fiber_gr; plot calories * fat/name='plot'; run; quit; ods noptitle; goptions hsize=8 cm vsize=5 cm target=jpeg devmap=winansi keymap=winansi colors=(none) ctitle=black ; proc gplot data=test.cereals;by fiber_gr; plot sodium * potassiu/name='plot'; run; quit; ods document close; ods listing;

*name ='plot' in order to create the same serie as gplot in the work.gseg; *=============== third try with ods layout and javaimg===; proc document name=test.cerealdoc2; list/levels=all; run; quit; ods listing close; ods pdf file="d:\newperfectpages.pdf"; ods pdf startpage=never; proc document name=test.cerealdoc2; replay \Print#1\ByGroup1#1\Print#1; replay \Means#1\Summary#1; run;quit; ods layout start columns=2; proc document name=test.cerealdoc2; replay \Gplot#1\ByGroup1#1\Gplot#1; replay \Gplot#2\ByGroup1#1\Gplot#1; run;quit; ods layout end; ods pdf startpage=now; ods pdf startpage=never; proc document name=test.cerealdoc2; replay \Print#1\ByGroup2#1\Print#1; replay \Means#1\Summary#1; run;quit; ods layout start columns=2; proc document name=test.cerealdoc2; replay \Gplot#1\ByGroup2#1\Gplot#1; replay \Gplot#2\ByGroup2#1\Gplot#1; run;quit; ods layout end; ods pdf startpage=now; ods pdf startpage=never; ods layout start columns=2; proc document name=test.cerealdoc2; replay \Gplot#1\ByGroup3#1\Gplot#1; replay \Gplot#2\ByGroup3#1\Gplot#1; run;quit; ods layout end; ods pdf close; ods listing;

the pdf output is on three pages of good quality but ods layout seems not working as the second graph follows the preceeding one and is not side by side despite the colums=2!

As anyone a better pratice upon ods layout? (i respect the limitation of ods layout to the ods printer output (pdf is a subsystem of this destination) don't try with ods rtf! Conclusion the classical pdf solution without document was working better! (see my mail of 11/03/2005 As i did not open the doc window, i did not read a warning limit of proc print inside document! point2) Andre

-- Andre Wielki INED (Institut National d'Etudes Démographiques) 133 Boulevard Davout 75980 Paris Cedex 20 33 (0) 1 56 06 21 54 FRANCE


Back to: Top of message | Previous page | Main SAS-L page