<?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: proc report concatenate columns while retaining style from each in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-concatenate-columns-while-retaining-style-from-each/m-p/617922#M23701</link>
    <description>&lt;P&gt;This is exactly what I needed!&amp;nbsp; Thanks Cynthia.&amp;nbsp; I only did it in the header to make the point because I couldn't get it to work in the cells.&amp;nbsp; I really appreciate the help!&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2020 20:39:55 GMT</pubDate>
    <dc:creator>Rae_</dc:creator>
    <dc:date>2020-01-16T20:39:55Z</dc:date>
    <item>
      <title>proc report concatenate columns while retaining style from each</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-concatenate-columns-while-retaining-style-from-each/m-p/616264#M23673</link>
      <description>&lt;P&gt;I'm trying to concatenate two rows one that has standard format and one is italic but I'd like to retain the formatting of the columns so the first part of the text is standard and the second part is italic. As an example I've used the cars data set to illustrate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data cars;&lt;BR /&gt;set sashelp.cars;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc freq data=cars;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; table make*type/list out=c1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods escape char="~";&lt;BR /&gt;proc report data=c1 split='^' style=journal;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;column make type final count;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;define make /display left 'Make' style(column)=[width=10%] ;&lt;BR /&gt;define type /left display 'Type' style(column)=[width=10% font_style=italic];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; define final /computed left 'Make, ~S={font_style=italic}Type' style(column)=[width=10%] ;&lt;BR /&gt;define count/center display "M(SD) ^ or N(%)" style(column)=[width=10%];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;compute final /character length=95;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; final=cat(trim(make),", ",left(trim(type)));&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd initially attached this to another thread but haven't gotten any responses so I figured it was best to ask a new question.&amp;nbsp; &lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Concatenate-Variables-in-proc-report/m-p/615819#M23661" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Concatenate-Variables-in-proc-report/m-p/615819#M23661&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 19:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-concatenate-columns-while-retaining-style-from-each/m-p/616264#M23673</guid>
      <dc:creator>Rae_</dc:creator>
      <dc:date>2020-01-09T19:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: proc report concatenate columns while retaining style from each</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-concatenate-columns-while-retaining-style-from-each/m-p/616609#M23679</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You've got the right idea about needing ODS ESCAPECHAR, but you're using it in the WRONG place. The data values will not automatically use italic from the TYPE column in the COMPUTE block for FINAL. The style in one cell is not going to impact the style in a computed . And ESCAPECHAR is one word (not 2 words as you show).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="correct_escapechar.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35269i45852B024B7222EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="correct_escapechar.png" alt="correct_escapechar.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; It wasn't clear to me whether you wanted the HEADER to use 2 different styles or the HEADER and the DATA values. In this output. I did both the HEADER and the DATA/COLUMN values. I used red as the foreground for MAKE just to show how to apply a different style to the MAKE value too. And I switched to the current method for specifying the style formatting your method (~S=) is the original method, which may still work, but doesn't have the same capabilities for nesting as the current method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 21:10:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-concatenate-columns-while-retaining-style-from-each/m-p/616609#M23679</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-01-10T21:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: proc report concatenate columns while retaining style from each</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-concatenate-columns-while-retaining-style-from-each/m-p/617922#M23701</link>
      <description>&lt;P&gt;This is exactly what I needed!&amp;nbsp; Thanks Cynthia.&amp;nbsp; I only did it in the header to make the point because I couldn't get it to work in the cells.&amp;nbsp; I really appreciate the help!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 20:39:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-concatenate-columns-while-retaining-style-from-each/m-p/617922#M23701</guid>
      <dc:creator>Rae_</dc:creator>
      <dc:date>2020-01-16T20:39:55Z</dc:date>
    </item>
  </channel>
</rss>

