BookmarkSubscribeRSS Feed
BenConner
Pyrite | Level 9

Hi,

 

I'm trying to get a handle on gridded layouts and how they can be used in conjunction with absolute layouts.

 

Can a gridded layout be nested within an absolute layout?  If so, then consider the following sample code:

 

1590  %let path=c:\temp\;
1591
1592  options orientation=landscape;
1593  ods escapechar='^';
1594
1595  ods PDF file="&path.temp.pdf" notoc dpi=150;
NOTE: Writing ODS PDF output to DISK destination "c:\temp\temp.pdf", printer "PDF".
1596
1597  ods layout absolute y=.25in x=.25in width=10.5in height=8in;
1598
1599  ods layout gridded advance=bygroup  column_gutter=0in
1600                     x=0in y=1.8in
1601                     columns=2 column_widths=(5in 5in)
1602                     rows=3 row_heights=(2in 2in 2in);
WARNING: LAYOUT placement exceeds available space for PDF destination.  Setting Y=0in.
1603
1604  ods region;
1605  ods layout end;
1606
1607  ods layout end;
1608  ods pdf close;
NOTE: ODS PDF printed 1 page to c:\temp\temp.pdf.

 

In landscape mode, the vertical distance inside the absolute layout is 8 inches. The grid started at 1.8 inches and had 6 more inches for the 3 rows, for 7.8 inches.  So I don't understand why Y was set to 0.  ?

 

Thanks!

 

--Ben

2 REPLIES 2
BenConner
Pyrite | Level 9

Ok, apparently embedding one layout inside another isn't a real good idea. 🙂  Next question that comes up is with a layout statement like:

 

ods layout gridded advance=bygroup order_type=row_major column_gutter=0in

       x=0in y=1.027in width=10in height=6.25in

       columns=2 column_widths=(5in 5in)

       rows=3 row_heights=(2in 2in 2in);

 

 

I would think this would fit 3 rows and 2 columns on a page; what I'm seeing is 1 row printing, then advancing to the next page.  ?

 

--Ben

BenConner
Pyrite | Level 9

Found the issue.  There is a row_gutter= value as well that I didn't set.  Making that = to 0in did the trick.

 

--Ben

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1016 views
  • 0 likes
  • 1 in conversation