<?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: Can I apply different custom headers to every table using Proc Template? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Can-I-apply-different-custom-headers-to-every-table-using-Proc/m-p/888985#M44037</link>
    <description>&lt;P&gt;Possibly the "easiest" is to use MVAR statement and a macro variable.&lt;/P&gt;
&lt;P&gt;You would add an MVAR statement with the list of macro variables to be used&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Mvar titletext ;&lt;/PRE&gt;
&lt;P&gt;before the headers.&lt;/P&gt;
&lt;P&gt;In the header you want use that variable in the Text statement.&lt;/P&gt;
&lt;P&gt;Very basic:&lt;/P&gt;
&lt;PRE&gt;text titletext;&lt;/PRE&gt;
&lt;P&gt;You would place any other fixed text in quotes before and/or after the macro variable. So suppose you had a class subject title that wanted to read as "Class scores for Algebra".&lt;/P&gt;
&lt;P&gt;you might, after defining the Subject in Mvar use&lt;/P&gt;
&lt;PRE&gt;text "Class scores for "  subject;&lt;/PRE&gt;
&lt;P&gt;Prior to actual USE of the template you would have to define the Macro variable.&lt;/P&gt;
&lt;PRE&gt;%let titletext= Classroom BMI Information;
%let subject= Algebra;&lt;/PRE&gt;
&lt;P&gt;DYNAMIC is similar to MVAR but links to the value of either data step variable or something a Procedure generates (though finding those may be fun)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NMVAR is similar to MVAR but attempts to convert the value to an actual numeric value so could be used in a calculation.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Aug 2023 18:51:22 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-08-11T18:51:22Z</dc:date>
    <item>
      <title>Can I apply different custom headers to every table using Proc Template?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Can-I-apply-different-custom-headers-to-every-table-using-Proc/m-p/888978#M44036</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am learning proc template and&amp;nbsp;wanted to apply different&amp;nbsp;text headers, to different table headers, in for Proc Freq/other procedures (if that's possible).&amp;nbsp;I've seen macros for templates, but I can't recall if there were any macros used to apply custom table headers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/content/dam/SAS/support/en/products-solutions/base-sas/tip-sheets/table-tips.pdf" target="_self"&gt;Example&lt;/A&gt;&amp;nbsp;of what I'm looking for:&lt;/P&gt;
&lt;P&gt;This code gives the title for the following table:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fastandcurious_0-1691776337816.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86679iDE9FA33CA6200838/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fastandcurious_0-1691776337816.png" alt="fastandcurious_0-1691776337816.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fastandcurious_1-1691776398841.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86680i77A6D6B46953E80A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fastandcurious_1-1691776398841.png" alt="fastandcurious_1-1691776398841.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example I saw uses the following statement, to apply the template:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;file=print ods=template="Classroom");&lt;/P&gt;
&lt;P&gt;put_ods_;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand proc template controls the style for ods, so I've been using a template that's suitable for all the tables, but it would be nice to put the "titles" in the headers for each table instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 18:11:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Can-I-apply-different-custom-headers-to-every-table-using-Proc/m-p/888978#M44036</guid>
      <dc:creator>fastandcurious</dc:creator>
      <dc:date>2023-08-11T18:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can I apply different custom headers to every table using Proc Template?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Can-I-apply-different-custom-headers-to-every-table-using-Proc/m-p/888985#M44037</link>
      <description>&lt;P&gt;Possibly the "easiest" is to use MVAR statement and a macro variable.&lt;/P&gt;
&lt;P&gt;You would add an MVAR statement with the list of macro variables to be used&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Mvar titletext ;&lt;/PRE&gt;
&lt;P&gt;before the headers.&lt;/P&gt;
&lt;P&gt;In the header you want use that variable in the Text statement.&lt;/P&gt;
&lt;P&gt;Very basic:&lt;/P&gt;
&lt;PRE&gt;text titletext;&lt;/PRE&gt;
&lt;P&gt;You would place any other fixed text in quotes before and/or after the macro variable. So suppose you had a class subject title that wanted to read as "Class scores for Algebra".&lt;/P&gt;
&lt;P&gt;you might, after defining the Subject in Mvar use&lt;/P&gt;
&lt;PRE&gt;text "Class scores for "  subject;&lt;/PRE&gt;
&lt;P&gt;Prior to actual USE of the template you would have to define the Macro variable.&lt;/P&gt;
&lt;PRE&gt;%let titletext= Classroom BMI Information;
%let subject= Algebra;&lt;/PRE&gt;
&lt;P&gt;DYNAMIC is similar to MVAR but links to the value of either data step variable or something a Procedure generates (though finding those may be fun)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NMVAR is similar to MVAR but attempts to convert the value to an actual numeric value so could be used in a calculation.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 18:51:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Can-I-apply-different-custom-headers-to-every-table-using-Proc/m-p/888985#M44037</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-08-11T18:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can I apply different custom headers to every table using Proc Template?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Can-I-apply-different-custom-headers-to-every-table-using-Proc/m-p/889194#M44061</link>
      <description>Thank for this, I'm going to give it a try and share the output when I get the chance.</description>
      <pubDate>Mon, 14 Aug 2023 14:24:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Can-I-apply-different-custom-headers-to-every-table-using-Proc/m-p/889194#M44061</guid>
      <dc:creator>fastandcurious</dc:creator>
      <dc:date>2023-08-14T14:24:14Z</dc:date>
    </item>
  </channel>
</rss>

