<?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: Adding a border in an ods region in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Adding-a-border-in-an-ods-region/m-p/570016#M22926</link>
    <description>&lt;P&gt;Hi:&lt;BR /&gt;You're writing ODS TEXT, not using a TITLE statement. Just curious. There is a TitleandFooterContainer in the style template that might work to turn the border on for the container. Not sure about ODS TEXT styles because those are controlled by a different style element.&lt;BR /&gt;&lt;BR /&gt;I rarely use Absolute layout .. just never had the kind of output where I could always rely on the text strings and data to be predictable.&lt;BR /&gt;&lt;BR /&gt;But without going down the ODS LAYOUT/ODS REGION road, I always like to see how I can do what is needed without the fancy stuff. So this is what I came up with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="make_title_text_box.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30637i4300B5F4DDC230B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="make_title_text_box.png" alt="make_title_text_box.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cyan background is regular SAS Title statement with a custom style template and pink background is regular ODS TEXT strings with a custom style template. I thought I would need to use TitleandFooterContainer in the template, but I was able to put the border control in the style element directly for SystemTitle and UserText.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code is here:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);
 
proc template;
  define style makebox;
  parent=styles.pearl;
  class SystemTitle /
    frame=box
    background=cyan
	width=100%
	fontfamily='ArialUnicodeMS'
	fontsize=10pt
	fontweight=bold
	just=c
	vjust=m
	cellpadding=2px
	borderwidth=1px
	bordercolor=black
	color=black;

  class UserText from SystemTitle/
    frame=box
    background=pink
	width=100%
	fontfamily='ArialUnicodeMS'
	fontsize=10pt
	fontweight=bold
	just=c
	vjust=m
	cellpadding=2px
	borderwidth=1px
	bordercolor=purple
	color=black;
  end;
run;
 
options orientation=portrait center nodate nonumber 
        topmargin=1in bottommargin=1in leftmargin=1in rightmargin=1in;
		  
ods pdf file='c:\temp\usetitle_box.pdf' style=makebox;
title 'Test Title1^nTest Title2';
proc print data=sashelp.class(obs=1)
     style(table)={width=5in};
run;
ods pdf close;
title;

ods pdf file='c:\temp\useODSTEXT.pdf' style=makebox startpage=no;
ods text="Test Title1^nTest Title2";
proc print data=sashelp.class(obs=1)
     style(table)={width=5in};
run;
ods pdf close;
title;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps give you some ideas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;BR /&gt;Cynthia&lt;/P&gt;</description>
    <pubDate>Sat, 29 Jun 2019 13:50:42 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2019-06-29T13:50:42Z</dc:date>
    <item>
      <title>Adding a border in an ods region</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Adding-a-border-in-an-ods-region/m-p/569523#M22911</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm experimenting with the best way to define a border around&amp;nbsp; an&amp;nbsp;ODS&amp;nbsp;region in an absolute layout example.&amp;nbsp; What I'd like to see is a thin black border, title text inside it and have the background of the region not be white.&lt;/P&gt;&lt;P&gt;Using the sample code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let st=fontfamily='Arial' fontsize=10pt just=c cellwidth=7.2in cellheight=.31in vjust=c background=cyan;&lt;/P&gt;&lt;P&gt;ods pdf file="c:\temp\weekly.pdf";&lt;/P&gt;&lt;P&gt;ods layout absolute y=0in x=0in;&lt;/P&gt;&lt;P&gt;ods region y=.5in x=.4in width=7.25in height=.35in style=[borderwidth=1 bordercolor=black];&lt;/P&gt;&lt;P&gt;ods text="^{style[&amp;amp;st]Test Title1^nTest Title2}";&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;Produces something close but not quite there.&amp;nbsp; If I declare the cell height/width the exact same as the region size, the borders from the region style get overlaid.&amp;nbsp; Tried adding border information into the style for the ods text statement but that had no effect.&amp;nbsp; ?&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>Thu, 27 Jun 2019 16:21:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Adding-a-border-in-an-ods-region/m-p/569523#M22911</guid>
      <dc:creator>bconner</dc:creator>
      <dc:date>2019-06-27T16:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a border in an ods region</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Adding-a-border-in-an-ods-region/m-p/570016#M22926</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;You're writing ODS TEXT, not using a TITLE statement. Just curious. There is a TitleandFooterContainer in the style template that might work to turn the border on for the container. Not sure about ODS TEXT styles because those are controlled by a different style element.&lt;BR /&gt;&lt;BR /&gt;I rarely use Absolute layout .. just never had the kind of output where I could always rely on the text strings and data to be predictable.&lt;BR /&gt;&lt;BR /&gt;But without going down the ODS LAYOUT/ODS REGION road, I always like to see how I can do what is needed without the fancy stuff. So this is what I came up with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="make_title_text_box.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30637i4300B5F4DDC230B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="make_title_text_box.png" alt="make_title_text_box.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cyan background is regular SAS Title statement with a custom style template and pink background is regular ODS TEXT strings with a custom style template. I thought I would need to use TitleandFooterContainer in the template, but I was able to put the border control in the style element directly for SystemTitle and UserText.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code is here:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);
 
proc template;
  define style makebox;
  parent=styles.pearl;
  class SystemTitle /
    frame=box
    background=cyan
	width=100%
	fontfamily='ArialUnicodeMS'
	fontsize=10pt
	fontweight=bold
	just=c
	vjust=m
	cellpadding=2px
	borderwidth=1px
	bordercolor=black
	color=black;

  class UserText from SystemTitle/
    frame=box
    background=pink
	width=100%
	fontfamily='ArialUnicodeMS'
	fontsize=10pt
	fontweight=bold
	just=c
	vjust=m
	cellpadding=2px
	borderwidth=1px
	bordercolor=purple
	color=black;
  end;
run;
 
options orientation=portrait center nodate nonumber 
        topmargin=1in bottommargin=1in leftmargin=1in rightmargin=1in;
		  
ods pdf file='c:\temp\usetitle_box.pdf' style=makebox;
title 'Test Title1^nTest Title2';
proc print data=sashelp.class(obs=1)
     style(table)={width=5in};
run;
ods pdf close;
title;

ods pdf file='c:\temp\useODSTEXT.pdf' style=makebox startpage=no;
ods text="Test Title1^nTest Title2";
proc print data=sashelp.class(obs=1)
     style(table)={width=5in};
run;
ods pdf close;
title;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps give you some ideas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jun 2019 13:50:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Adding-a-border-in-an-ods-region/m-p/570016#M22926</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-06-29T13:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a border in an ods region</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Adding-a-border-in-an-ods-region/m-p/570278#M22936</link>
      <description>&lt;P&gt;Hi Cynthia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yeah...most of the reports we do have very picky layout, so Absolute has been the tool of choice.&amp;nbsp; Also why I disabled titles, as I can't get those to line up exactly on top of a proc report and make it look like&amp;nbsp;they grew there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I could make the area the title has sit exactly on top of the proc print, that would get close.&amp;nbsp; I'll play around with that and see if I can get it to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--Ben&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 14:56:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Adding-a-border-in-an-ods-region/m-p/570278#M22936</guid>
      <dc:creator>bconner</dc:creator>
      <dc:date>2019-07-01T14:56:47Z</dc:date>
    </item>
  </channel>
</rss>

