<?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: Custom PROC Template with PROC Report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Custom-PROC-Template-with-PROC-Report/m-p/578862#M164243</link>
    <description>&lt;P&gt;Use an ODS PATH statement when creating custom templates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname process1 '/folders/myfolders/templates';

ods path template.process1(update) sashelp.tmplmst(read);

proc template;
	define style MyStyle /store=process1.tmplts;
		Replace Table from Output / 
		  frame=BOX 
		  Rules=groups 
		  cellpadding=2pt 
		  borderspacing=0.75pt 
		  borderwidth=0.75pt 
		  borderstyle=solid;
		Replace Body from Document / 
		  topmargin=1in 
		  bottommargin=1in 
		  leftmargin=1in 
		  rightmargin=1in;
		parent=styles.sasdocPrinter;
		replace fonts / 
		  'TitleFont2'=("Times New Roman", 10.1pt) 
		  'TitleFont'=("Times New Roman", 10.1pt) 
		  'StrongFont'=("Times New Roman", 10.1pt) 
		  'EmphasisFont'=("Times New Roman", 10.1pt) 
		  'FixedEmphasisFont'=("Courier New", 10.1pt) 
		  'FixedStrongFont'=("Courier New", 10.1pt) 
		  'FixedHeadingFont'=("Courier New", 10.1pt) 
		  'BatchFixedFont'=("Courier New", 10.1pt) 
		  'FixedFont'=("Courier New", 10.1pt) 
		  'headingEmphasisFont'=("Times New Roman", 10.1pt) 
		  'headingFont'=("Times New Roman", 10.1pt) 
		  'docFont'=("Times New Roman", 10.1pt);
	end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then use an ODS PATH statement in your other programs to let SAS know that you have your own style templates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nodate;

libname process1 '/folders/myfolders/templates';

* MyStyle template has been saved to process1 library in a separate program ;

* use ods path statement to make custom templates available ;

ods path process1.tmplts(update) sashelp.tmplmst(read);

ods pdf 
  style=MyStyle 
  file='/folders/myfolders/templates/Example using custom template.pdf' ;

proc print data=sashelp.class;
run;

ods pdf close;

ods path reset;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The screen shot below shows the PROC PRINT using the custom style.&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="PROC PRINT using custom style" style="width: 464px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31500iE5F60871C08F544A/image-size/large?v=v2&amp;amp;px=999" role="button" title="PROC PRINT using custom style.jpg" alt="PROC PRINT using custom style" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;PROC PRINT using custom style&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 03 Aug 2019 00:53:49 GMT</pubDate>
    <dc:creator>SuzanneDorinski</dc:creator>
    <dc:date>2019-08-03T00:53:49Z</dc:date>
    <item>
      <title>Custom PROC Template with PROC Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Custom-PROC-Template-with-PROC-Report/m-p/577449#M163625</link>
      <description>&lt;P&gt;I created a custom PROC TEMPLATE with all my desired fonts for generic table outputs by modifying an existing PDF style sasdocPrinter. I then stored this template into my working library, process1.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
	define style MyStyle /store=process1.tmplts;
		Replace Table from Output / frame=BOX Rules=groups cellpadding=2pt 
			borderspacing=0.75pt borderwidth=0.75pt borderstyle=solid;
		Replace Body from Document / topmargin=1in bottommargin=1in 
			leftmargin=1in rightmargin=1in;
		parent=styles.sasdocPrinter;
		replace fonts / 'TitleFont2'=("Times New Roman", 10.1pt) 
			'TitleFont'=("Times New Roman", 10.1pt) 'StrongFont'=("Times New Roman", 
			10.1pt) 'EmphasisFont'=("Times New Roman", 10.1pt) 
			'FixedEmphasisFont'=("Courier New", 10.1pt) 
			'FixedStrongFont'=("Courier New", 10.1pt) 'FixedHeadingFont'=("Courier New", 
			10.1pt) 'BatchFixedFont'=("Courier New", 10.1pt) 'FixedFont'=("Courier New", 
			10.1pt) 'headingEmphasisFont'=("Times New Roman", 10.1pt) 
			'headingFont'=("Times New Roman", 10.1pt) 'docFont'=("Times New Roman", 
			10.1pt);
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm in the same library, process1, to create my tables/figures/listings because I find staying in the same library easier for my work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I point to my custom template in the ODS PDF statement, nothing happens to my fonts, which means SAS isn't reading my template at all:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods pdf style=tmplts.MyStyle;

proc report data=counts3 nowindows split="*" style(report)={rules=NONE frame=void}
headline headskip;
	columns (invnid coli2 coli1 coli3);
	define invnid /order style={cellwidth=31% asis=on just=l}
	"Investigator Name, and Investigator Number"; 
	define coli2 /display style={cellwidth=22% just=c} spacing=3 order order=data flow "Placebo*(n=&amp;amp;n2)" left;
	define coli1 /display style={cellwidth=22% just=c} spacing=3 order order=data flow "CMP-135 * (n=&amp;amp;n1)" left;
	define coli3 /display style={cellwidth=22% just=c} spacing=3 order order=data flow "All Patients * (n=&amp;amp;n3)" left;
	break after invnid/skip;
	compute after _page_/style={just=l font_face='Courier New' font_size=10pt bordertopcolor=black bordertopwidth=0.25};
line "Note:";
line "Investigator name &amp;amp; ID number used.";
endcomp;
	title1 j=l 'Company/PRJ5457C';
	title2 j=c 'Table 14.1/1';
	title3 j=c 'Enrollment by Investigator';
	title4 j=c 'Randomized Patients';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How do I make sure that my template's parameters are invoked? THANK YOU!&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2019 17:16:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Custom-PROC-Template-with-PROC-Report/m-p/577449#M163625</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2019-07-29T17:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Custom PROC Template with PROC Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Custom-PROC-Template-with-PROC-Report/m-p/578862#M164243</link>
      <description>&lt;P&gt;Use an ODS PATH statement when creating custom templates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname process1 '/folders/myfolders/templates';

ods path template.process1(update) sashelp.tmplmst(read);

proc template;
	define style MyStyle /store=process1.tmplts;
		Replace Table from Output / 
		  frame=BOX 
		  Rules=groups 
		  cellpadding=2pt 
		  borderspacing=0.75pt 
		  borderwidth=0.75pt 
		  borderstyle=solid;
		Replace Body from Document / 
		  topmargin=1in 
		  bottommargin=1in 
		  leftmargin=1in 
		  rightmargin=1in;
		parent=styles.sasdocPrinter;
		replace fonts / 
		  'TitleFont2'=("Times New Roman", 10.1pt) 
		  'TitleFont'=("Times New Roman", 10.1pt) 
		  'StrongFont'=("Times New Roman", 10.1pt) 
		  'EmphasisFont'=("Times New Roman", 10.1pt) 
		  'FixedEmphasisFont'=("Courier New", 10.1pt) 
		  'FixedStrongFont'=("Courier New", 10.1pt) 
		  'FixedHeadingFont'=("Courier New", 10.1pt) 
		  'BatchFixedFont'=("Courier New", 10.1pt) 
		  'FixedFont'=("Courier New", 10.1pt) 
		  'headingEmphasisFont'=("Times New Roman", 10.1pt) 
		  'headingFont'=("Times New Roman", 10.1pt) 
		  'docFont'=("Times New Roman", 10.1pt);
	end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then use an ODS PATH statement in your other programs to let SAS know that you have your own style templates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nodate;

libname process1 '/folders/myfolders/templates';

* MyStyle template has been saved to process1 library in a separate program ;

* use ods path statement to make custom templates available ;

ods path process1.tmplts(update) sashelp.tmplmst(read);

ods pdf 
  style=MyStyle 
  file='/folders/myfolders/templates/Example using custom template.pdf' ;

proc print data=sashelp.class;
run;

ods pdf close;

ods path reset;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The screen shot below shows the PROC PRINT using the custom style.&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="PROC PRINT using custom style" style="width: 464px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31500iE5F60871C08F544A/image-size/large?v=v2&amp;amp;px=999" role="button" title="PROC PRINT using custom style.jpg" alt="PROC PRINT using custom style" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;PROC PRINT using custom style&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Aug 2019 00:53:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Custom-PROC-Template-with-PROC-Report/m-p/578862#M164243</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2019-08-03T00:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Custom PROC Template with PROC Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Custom-PROC-Template-with-PROC-Report/m-p/578940#M164281</link>
      <description>&lt;P&gt;Thank you so much; I appreciate your help!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Aug 2019 22:34:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Custom-PROC-Template-with-PROC-Report/m-p/578940#M164281</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2019-08-03T22:34:24Z</dc:date>
    </item>
  </channel>
</rss>

