The SAS Output Delivery System and reporting techniques

ods region layout question

Reply
Regular Contributor
Posts: 169

ods region layout question

Hi,

 

I have a sample program:

 

%let path=c:\users\bconner\;

ods escapechar='^';
options orientation=landscape;

dm 'clear log';
ods PDF file="&path.test.pdf" notoc;
ods layout absolute y=.25in x=.25in width=10.5in height=8in;


ods region y=.32in x=8.125in width=2in height=.8125in  style={background=green};
ods text = "^{style[background=lightgreen]Line 1}";

ods region y=2.025in x=.1in width=5in height=.25in style={background=blue};
ods text = "Line 2";

ods layout end;
ods pdf close;

 

That generates the following log:

7162  options orientation=landscape;
7163
7164  dm 'clear log';
7165  ods PDF file="&path.test.pdf" notoc;
SYMBOLGEN:  Macro variable PATH resolves to c:\users\bconner\
NOTE: Writing ODS PDF output to DISK destination "c:\users\bconner\test.pdf", printer "PDF".
7166  ods layout absolute y=.25in x=.25in width=10.5in height=8in;
7167
7168
7169  ods region y=.32in x=8.125in width=2in height=.8125in  style={background=green};
7170  ods text = "^{style[background=lightgreen]Line 1}";
7171
7172  ods region y=2.025in x=.1in width=5in height=.25in style={background=blue};
WARNING: WIDTH exceeds LAYOUT WIDTH for PDF destination. This option will be ignored.
7173
7174  ods text = "Line 2";
7175
7176  ods layout end;
7177  ods pdf close;
NOTE: ODS PDF printed 1 page to c:\users\bconner\test.pdf.

 

I can't see why the warning gets generated.  The layout width is 10".  The region starts at .1" and goes for 5", ending at 5.1".  ??

 

Thanks!

 

--Ben

SAS Super FREQ
Posts: 8,743

Re: ods region layout question

Hi:
I can't see what your margin settings are. ODS PDF automatically reserves space for margins, I think. So it's possible that somehow it thinks that your region won't fit. Otherwise, I think you're going to have to work with Tech Support.

I do note that in this paper on page 4, insider tip #2, there is a recommendation as to margins:
http://support.sas.com/resources/papers/proceedings15/SAS1836-2015.pdf

cynthia
Regular Contributor
Posts: 169

Re: ods region layout question

Hi Cynthia,

 

Sorry, had forgotten to copy the margin spec into the example:

 

options topmargin=.001IN bottommargin=.001IN leftmargin=.001IN rightmargin=.001IN ;

 

Adding this to the sample code just makes it get weirder:

 

66   dm 'clear log';
67   options topmargin=.001IN bottommargin=.001IN leftmargin=.001IN rightmargin=.001IN  orientation=landscape;
68   ods PDF file="&path.test.pdf" notoc;
NOTE: Writing ODS PDF output to DISK destination "c:\users\bconner\test.pdf", printer "PDF".
69   ods layout absolute y=.25in x=.25in width=10.5in height=8in;
WARNING: LAYOUT placement exceeds available space for PDF destination.  Setting Y=0.153333in.
70
71
72   ods region y=.32in x=8.125in width=2in height=.8125in  style={background=green};
73   ods text = "^{style[background=lightgreen]Line 1}";
74
75   ods region y=2.025in x=.1in width=5in height=.25in style={background=blue};
WARNING: WIDTH exceeds LAYOUT WIDTH for PDF destination. This option will be ignored.
76   ods text = "Line 2";
77
78   ods layout end;
79   ods pdf close;
NOTE: ODS PDF printed 1 page to c:\users\bconner\test.pdf.

 

Will run this by TS for clarification.  Thanks!

 

--Ben

 

 

 

Regular Contributor
Posts: 169

Re: ods region layout question

Still waiting for clarification from SAS Tech Support. Sigh... --Ben
New Contributor
Posts: 4

Re: ods region layout question

Hi,

   I am facing similar issue, where i have specified pdf page size, margins and layouts. But while specifing ODS Region, it's producing warning. 

 

please post the solution/fix any if it has been resolved.

 

Thanks.

Regular Contributor
Posts: 169

Re: ods region layout question

This took a good while to research, but the issue relates to having the width and height specified on the region statement.  Removing these two parameters made the problem go away.  It shouldn't have been an issue but is in the current release.

 

In my case it was workable as I have white backgrounds on the region anyway and it worked just fine.

 

--Ben

Ask a Question
Discussion stats
  • 5 replies
  • 547 views
  • 0 likes
  • 3 in conversation