<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: vjust usage in a region in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/285050#M16366</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Well, you might have stumbled on an issue. Taking ODS LAYOUT out of the picture and just seeing whether the VJUST works when there's no ODS LAYOUT involved, I have discovered that VJUST does not appear to impact ODS TEXT the same way it does a title statement. For example, compare these 3 outputs. To create this output, I had to make the font smaller (so it would not fill the height and so the impact of VJUST would be evident). I used a STYLE template because that removes the possibility of any strange formatting issues with ODS ESCAPECHAR. I also changed to the Arial Unicode MS font, which is the version of Arial that I have always been encouraged to use with PDF. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Without ODS LAYOUT or ODS ESCAPECHAR in the picture, the results are not happy:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4104i86198CB9009C9090/image-size/original?v=v2&amp;amp;px=-1" alt="possible_problem_with_vjust.png" title="possible_problem_with_vjust.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see, the VJUST style attribute worked for the SAS TITLE statement, but did NOT work for ODS TEXT, even though all the other attributes worked for ODS TEXT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may have stumbled onto something that has been a problem with ODS TEXT for a while. So if this is the behavior without involving ODS LAYOUT or ODS ESCAPECHAR, I would not expect the behavior to be any different with ODS LAYOUT or ODS ESCAPECHAR.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; This might be something to work on with Tech Support, but given that the behavior doesn't work without ODS LAYOUT, they'd have to figure out what THAT is about -- but they might have a workaround for your text string using ODS LAYOUT. OR, since the vjust works in the TITLE statement, you might try that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Just remember, the bigger your font, the less you will see the impact of VJUST. So, for example, if I change my code to 28pt, then this is all I see because the value of vjust will not really be apparent the larger the font is:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4105i1F00C22748385049/image-size/original?v=v2&amp;amp;px=-1" alt="vjust28.png" title="vjust28.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the code I used:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html close;

** 1 Top vertical justification;
ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);

proc template;
  define style styles.tltop;
    parent=styles.pearl;
	class SystemTitle /
	   vjust=top
	   just=center
	   background=pink
	   height=.5in
       fontsize=6pt
       fontweight=bold
       font_face='Arial Unicode MS';
	class UserText /
	   vjust=top
	   just=center
	   background=pink
	   height=.5in
       fontsize=6pt
       fontweight=bold
       font_face='Arial Unicode MS';
  end;
run;

options orientation=landscape topmargin=0.05in bottommargin=0.05in rightmargin=0.05in leftmargin=0.05in;
title;

ods PDF file='c:\temp\reg_title_top.pdf' notoc startpage=no style=styles.tltop;
ods escapechar='^';
title 'TOP Title';
ods text = 'TOP Title';

proc print data=sashelp.class(obs=1);
run;
 

ods pdf close;


** 2 Bottom vertical justification;

ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);

proc template;
  define style styles.tlbot;
    parent=styles.pearl;
	class SystemTitle /
	   vjust=bottom
	   just=center
	   background=pink
	   height=.5in
       fontsize=6pt
       fontweight=bold
       font_face='Arial Unicode MS';
	class UserText /
	   vjust=bottom
	   just=center
	   background=pink
	   height=.5in
       fontsize=6pt
       fontweight=bold
       font_face='Arial Unicode MS';
  end;
run;

options orientation=landscape topmargin=0.05in bottommargin=0.05in rightmargin=0.05in leftmargin=0.05in;
title;

ods PDF file='c:\temp\test_reg_bot.pdf' notoc startpage=no style=styles.tlbot;
ods escapechar='^';

title 'BOT Title';
ods text = 'BOT Title';

proc print data=sashelp.class(obs=1);
run;

ods pdf close;


** 3 Middle vertical justification;

ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);

proc template;
  define style styles.tlmid;
    parent=styles.pearl;
	class SystemTitle /
	   vjust=m
	   just=center
	   background=pink
	   height=.5in
       fontsize=6pt
       fontweight=bold
       font_face='Arial Unicode MS';
	class UserText /
	   vjust=m
	   just=center
	   background=pink
	   height=.5in
       fontsize=6pt
       fontweight=bold
       font_face='Arial Unicode MS';
  end;
run;

options orientation=landscape topmargin=0.05in bottommargin=0.05in rightmargin=0.05in leftmargin=0.05in;
title;

ods PDF file='c:\temp\test_reg_mid.pdf' notoc startpage=no style=styles.tlmid;
ods escapechar='^';

title 'MID Title';
ods text = 'MID Title';

proc print data=sashelp.class(obs=1);
run;

ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 16 Jul 2016 16:46:16 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2016-07-16T16:46:16Z</dc:date>
    <item>
      <title>vjust usage in a region</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/284878#M16359</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am trying to figure out how to vertically center a title in a region and am missing something.&amp;nbsp; Sample code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods PDF file='c:\temp\test.pdf' notoc;&lt;/P&gt;
&lt;P&gt;ods layout absolute y=.25in x=.25in width=10.5in height=8in;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods region height=1in style={background=cyan};&lt;/P&gt;
&lt;P&gt;ods text = '^{style [font_face=arial fontsize=16pt vjust=m just=center] Test Title}';&lt;/P&gt;
&lt;P&gt;ods layout end;&lt;/P&gt;
&lt;P&gt;ods pdf close;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would think the above code would center the title horizontally and vertically but on the former occurs.&amp;nbsp; ??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Ben&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 16:25:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/284878#M16359</guid>
      <dc:creator>BenConner</dc:creator>
      <dc:date>2016-07-15T16:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: vjust usage in a region</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/284992#M16364</link>
      <description>vjust=center  just=center</description>
      <pubDate>Sat, 16 Jul 2016 03:58:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/284992#M16364</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-07-16T03:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: vjust usage in a region</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/285050#M16366</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Well, you might have stumbled on an issue. Taking ODS LAYOUT out of the picture and just seeing whether the VJUST works when there's no ODS LAYOUT involved, I have discovered that VJUST does not appear to impact ODS TEXT the same way it does a title statement. For example, compare these 3 outputs. To create this output, I had to make the font smaller (so it would not fill the height and so the impact of VJUST would be evident). I used a STYLE template because that removes the possibility of any strange formatting issues with ODS ESCAPECHAR. I also changed to the Arial Unicode MS font, which is the version of Arial that I have always been encouraged to use with PDF. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Without ODS LAYOUT or ODS ESCAPECHAR in the picture, the results are not happy:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4104i86198CB9009C9090/image-size/original?v=v2&amp;amp;px=-1" alt="possible_problem_with_vjust.png" title="possible_problem_with_vjust.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see, the VJUST style attribute worked for the SAS TITLE statement, but did NOT work for ODS TEXT, even though all the other attributes worked for ODS TEXT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may have stumbled onto something that has been a problem with ODS TEXT for a while. So if this is the behavior without involving ODS LAYOUT or ODS ESCAPECHAR, I would not expect the behavior to be any different with ODS LAYOUT or ODS ESCAPECHAR.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; This might be something to work on with Tech Support, but given that the behavior doesn't work without ODS LAYOUT, they'd have to figure out what THAT is about -- but they might have a workaround for your text string using ODS LAYOUT. OR, since the vjust works in the TITLE statement, you might try that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Just remember, the bigger your font, the less you will see the impact of VJUST. So, for example, if I change my code to 28pt, then this is all I see because the value of vjust will not really be apparent the larger the font is:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4105i1F00C22748385049/image-size/original?v=v2&amp;amp;px=-1" alt="vjust28.png" title="vjust28.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the code I used:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html close;

** 1 Top vertical justification;
ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);

proc template;
  define style styles.tltop;
    parent=styles.pearl;
	class SystemTitle /
	   vjust=top
	   just=center
	   background=pink
	   height=.5in
       fontsize=6pt
       fontweight=bold
       font_face='Arial Unicode MS';
	class UserText /
	   vjust=top
	   just=center
	   background=pink
	   height=.5in
       fontsize=6pt
       fontweight=bold
       font_face='Arial Unicode MS';
  end;
run;

options orientation=landscape topmargin=0.05in bottommargin=0.05in rightmargin=0.05in leftmargin=0.05in;
title;

ods PDF file='c:\temp\reg_title_top.pdf' notoc startpage=no style=styles.tltop;
ods escapechar='^';
title 'TOP Title';
ods text = 'TOP Title';

proc print data=sashelp.class(obs=1);
run;
 

ods pdf close;


** 2 Bottom vertical justification;

ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);

proc template;
  define style styles.tlbot;
    parent=styles.pearl;
	class SystemTitle /
	   vjust=bottom
	   just=center
	   background=pink
	   height=.5in
       fontsize=6pt
       fontweight=bold
       font_face='Arial Unicode MS';
	class UserText /
	   vjust=bottom
	   just=center
	   background=pink
	   height=.5in
       fontsize=6pt
       fontweight=bold
       font_face='Arial Unicode MS';
  end;
run;

options orientation=landscape topmargin=0.05in bottommargin=0.05in rightmargin=0.05in leftmargin=0.05in;
title;

ods PDF file='c:\temp\test_reg_bot.pdf' notoc startpage=no style=styles.tlbot;
ods escapechar='^';

title 'BOT Title';
ods text = 'BOT Title';

proc print data=sashelp.class(obs=1);
run;

ods pdf close;


** 3 Middle vertical justification;

ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);

proc template;
  define style styles.tlmid;
    parent=styles.pearl;
	class SystemTitle /
	   vjust=m
	   just=center
	   background=pink
	   height=.5in
       fontsize=6pt
       fontweight=bold
       font_face='Arial Unicode MS';
	class UserText /
	   vjust=m
	   just=center
	   background=pink
	   height=.5in
       fontsize=6pt
       fontweight=bold
       font_face='Arial Unicode MS';
  end;
run;

options orientation=landscape topmargin=0.05in bottommargin=0.05in rightmargin=0.05in leftmargin=0.05in;
title;

ods PDF file='c:\temp\test_reg_mid.pdf' notoc startpage=no style=styles.tlmid;
ods escapechar='^';

title 'MID Title';
ods text = 'MID Title';

proc print data=sashelp.class(obs=1);
run;

ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 16 Jul 2016 16:46:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/285050#M16366</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-07-16T16:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: vjust usage in a region</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/285223#M16372</link>
      <description>&lt;P&gt;Hi Cynthia,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks, will run it by TS; what I'm actually trying to print isn't a title, but embedded in a much more complex layout.&amp;nbsp; At least it wasn't something I was missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Much appreciated!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Ben&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2016 13:21:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/285223#M16372</guid>
      <dc:creator>BenConner</dc:creator>
      <dc:date>2016-07-18T13:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: vjust usage in a region</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/285288#M16379</link>
      <description>Hi, Ben:&lt;BR /&gt;  Probably a good idea. I thought this paper by Scott Huntley might also be useful for you: &lt;A href="http://support.sas.com/resources/papers/proceedings15/SAS1836-2015.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings15/SAS1836-2015.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Good luck with your complex layout and Tech Support.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Mon, 18 Jul 2016 16:44:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/285288#M16379</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-07-18T16:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: vjust usage in a region</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/285603#M16393</link>
      <description>&lt;P&gt;Hi Cynthia,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have that one in a collection on my desk as well as the wonderful ones you have written.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chevell in T.S. found the key to what was happening: apparently to get&amp;nbsp;it to work I also need the cellheight=&lt;STRONG&gt;&lt;EM&gt;xx&lt;/EM&gt;&lt;/STRONG&gt;in option as well.&amp;nbsp; that tells the style interpreter how high the area is it needs to center.&amp;nbsp; That seems awkard that it doesn't default to the region height.&amp;nbsp; Even a warning would be nice.&amp;nbsp; But as long as I can control it, I'm good.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the final ODS&amp;nbsp;TEXT statement would be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods text = "^{style=[vjust=center just=center cellheight=3in] Test Title}";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Ben&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 18:35:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/285603#M16393</guid>
      <dc:creator>BenConner</dc:creator>
      <dc:date>2016-07-19T18:35:49Z</dc:date>
    </item>
  </channel>
</rss>

