<?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 HOW TO REMOVE THE LAST TEXT AFTER REGION WHEN THE TEXT IS DECORATED in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/HOW-TO-REMOVE-THE-LAST-TEXT-AFTER-REGION-WHEN-THE-TEXT-IS/m-p/806294#M317640</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ANIRBAN2_0-1649254634287.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70167i7E079D3E520F8FA4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ANIRBAN2_0-1649254634287.png" alt="ANIRBAN2_0-1649254634287.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I wanted to remove the last &lt;U&gt;value taken during and the year end.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods escapechar="^";&lt;BR /&gt;proc report data=sashelp.shoes spanrows split='#' out=abcd&lt;BR /&gt;style(header)=[foreground=BLACK background=ORANGE font_size=10pt font_weight=bold vjust=bottom]&lt;BR /&gt;style(report)=[cellspacing=2 cellpadding=10 borderwidth=1 bordercolor=black outputwidth=100% font_face=calibri font_weight=bold frame=box ];&lt;BR /&gt;title 'A2) Default Report Only Numeric Variables';&lt;BR /&gt;title2 'With COMPUTE block for new report items';&lt;BR /&gt;column region product sales returns inventory Profit pctinv ;&lt;BR /&gt;define region/display "REG" group style(column)=[vjust=center just=CENTER font_size=15pt cellwidth=0in backgroundcolor=yellow font_weight=bold] ;&lt;BR /&gt;define product /display format=$50. "PRO" group ;&lt;BR /&gt;define profit / computed f=dollar14.2 style(header)=[just=center background=blue] style(column)=[just=center font_size=10pt];&lt;BR /&gt;define pctinv /computed display "%" computed f=percent9.2 style(header)=[just=center background=blue] style(column)=[just=center font_size=10pt];&lt;BR /&gt;&lt;BR /&gt;compute pctinv;&lt;BR /&gt;profit = sum(sales.sum,-1*returns.sum);&lt;BR /&gt;pctinv = sales.sum/ inventory.sum;&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Compute Region;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;If Region='Central America/Caribbean' and _BREAK_ ="Region" then Region='USA';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;line region $varying100.;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;brktxt = ' ';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;text1='^{style[textdecoration=underline just=CENTER]Values taken during } ';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;text2='the Year End.';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;if region = 'Canada' then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;reglg = 0;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;reglg2 = 0;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;reglg3 = 0;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;else do; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;reglg = 1;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;reglg2 = 20;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;reglg3 = 20;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;endcomp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;break after region/summarize style={font_weight=bold font_size=10pt background=pink just=CENTER };&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;compute after region/ style={background=white};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;line brktxt $varying. reglg;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;line text1 $varying. reglg2; ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;line text2 $varying. reglg3;;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;endcomp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;/* compute after region /style={ background=white}; */&lt;BR /&gt;/* line ' '; */&lt;BR /&gt;/* line &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/162406"&gt;@20&lt;/a&gt; '^{style[textdecoration=underline just=CENTER]Values taken during } ' ; */&lt;BR /&gt;/* line &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/162406"&gt;@20&lt;/a&gt; 'the Year End.'; */&lt;BR /&gt;/* endcomp; */&lt;BR /&gt;rbreak after /summarize skip ul ol style={font_weight=bold font_size=10pt background=pink just=center};&lt;/P&gt;&lt;P&gt;/* line '^{style[foreground=white]Values taken during } ' */&lt;BR /&gt;Compute after/style={background=white just=CENTER };&lt;BR /&gt;Product="GRAND TOTAL of countries " ; /*HOW TO PUT THE TOTAL TEXT AND MAKE BOLD*/&lt;BR /&gt;REgion="GRAND";&lt;BR /&gt;line &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/290987"&gt;@50&lt;/a&gt; "THIS IS FROM ALL OVER THE WORLD";&lt;BR /&gt;Endcomp;&lt;/P&gt;&lt;P&gt;Footnote 'This is a system generated mail please dont respond to this ';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THE ERROR I AM GETTING&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ANIRBAN2_1-1649254858035.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70168i6207C82DF49999FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ANIRBAN2_1-1649254858035.png" alt="ANIRBAN2_1-1649254858035.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Apr 2022 14:21:33 GMT</pubDate>
    <dc:creator>ANIRBAN2</dc:creator>
    <dc:date>2022-04-06T14:21:33Z</dc:date>
    <item>
      <title>HOW TO REMOVE THE LAST TEXT AFTER REGION WHEN THE TEXT IS DECORATED</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HOW-TO-REMOVE-THE-LAST-TEXT-AFTER-REGION-WHEN-THE-TEXT-IS/m-p/806294#M317640</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ANIRBAN2_0-1649254634287.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70167i7E079D3E520F8FA4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ANIRBAN2_0-1649254634287.png" alt="ANIRBAN2_0-1649254634287.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I wanted to remove the last &lt;U&gt;value taken during and the year end.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods escapechar="^";&lt;BR /&gt;proc report data=sashelp.shoes spanrows split='#' out=abcd&lt;BR /&gt;style(header)=[foreground=BLACK background=ORANGE font_size=10pt font_weight=bold vjust=bottom]&lt;BR /&gt;style(report)=[cellspacing=2 cellpadding=10 borderwidth=1 bordercolor=black outputwidth=100% font_face=calibri font_weight=bold frame=box ];&lt;BR /&gt;title 'A2) Default Report Only Numeric Variables';&lt;BR /&gt;title2 'With COMPUTE block for new report items';&lt;BR /&gt;column region product sales returns inventory Profit pctinv ;&lt;BR /&gt;define region/display "REG" group style(column)=[vjust=center just=CENTER font_size=15pt cellwidth=0in backgroundcolor=yellow font_weight=bold] ;&lt;BR /&gt;define product /display format=$50. "PRO" group ;&lt;BR /&gt;define profit / computed f=dollar14.2 style(header)=[just=center background=blue] style(column)=[just=center font_size=10pt];&lt;BR /&gt;define pctinv /computed display "%" computed f=percent9.2 style(header)=[just=center background=blue] style(column)=[just=center font_size=10pt];&lt;BR /&gt;&lt;BR /&gt;compute pctinv;&lt;BR /&gt;profit = sum(sales.sum,-1*returns.sum);&lt;BR /&gt;pctinv = sales.sum/ inventory.sum;&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Compute Region;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;If Region='Central America/Caribbean' and _BREAK_ ="Region" then Region='USA';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;line region $varying100.;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;brktxt = ' ';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;text1='^{style[textdecoration=underline just=CENTER]Values taken during } ';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;text2='the Year End.';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;if region = 'Canada' then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;reglg = 0;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;reglg2 = 0;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;reglg3 = 0;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;else do; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;reglg = 1;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;reglg2 = 20;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;reglg3 = 20;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;endcomp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;break after region/summarize style={font_weight=bold font_size=10pt background=pink just=CENTER };&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;compute after region/ style={background=white};&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;line brktxt $varying. reglg;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;line text1 $varying. reglg2; ;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;line text2 $varying. reglg3;;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;endcomp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;/* compute after region /style={ background=white}; */&lt;BR /&gt;/* line ' '; */&lt;BR /&gt;/* line &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/162406"&gt;@20&lt;/a&gt; '^{style[textdecoration=underline just=CENTER]Values taken during } ' ; */&lt;BR /&gt;/* line &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/162406"&gt;@20&lt;/a&gt; 'the Year End.'; */&lt;BR /&gt;/* endcomp; */&lt;BR /&gt;rbreak after /summarize skip ul ol style={font_weight=bold font_size=10pt background=pink just=center};&lt;/P&gt;&lt;P&gt;/* line '^{style[foreground=white]Values taken during } ' */&lt;BR /&gt;Compute after/style={background=white just=CENTER };&lt;BR /&gt;Product="GRAND TOTAL of countries " ; /*HOW TO PUT THE TOTAL TEXT AND MAKE BOLD*/&lt;BR /&gt;REgion="GRAND";&lt;BR /&gt;line &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/290987"&gt;@50&lt;/a&gt; "THIS IS FROM ALL OVER THE WORLD";&lt;BR /&gt;Endcomp;&lt;/P&gt;&lt;P&gt;Footnote 'This is a system generated mail please dont respond to this ';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THE ERROR I AM GETTING&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ANIRBAN2_1-1649254858035.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70168i6207C82DF49999FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ANIRBAN2_1-1649254858035.png" alt="ANIRBAN2_1-1649254858035.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 14:21:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HOW-TO-REMOVE-THE-LAST-TEXT-AFTER-REGION-WHEN-THE-TEXT-IS/m-p/806294#M317640</guid>
      <dc:creator>ANIRBAN2</dc:creator>
      <dc:date>2022-04-06T14:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO REMOVE THE LAST TEXT AFTER REGION WHEN THE TEXT IS DECORATED</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HOW-TO-REMOVE-THE-LAST-TEXT-AFTER-REGION-WHEN-THE-TEXT-IS/m-p/806421#M317714</link>
      <description>&lt;P&gt;1 &lt;STRONG&gt;Please format your code when pasting it by using the apropriate icon&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2 Not too sure what your goal is.&lt;/P&gt;
&lt;P&gt;Do you want to replace the line statement with this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  compute before REGION;
    line REGION $100.;
  endcomp;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 22:48:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HOW-TO-REMOVE-THE-LAST-TEXT-AFTER-REGION-WHEN-THE-TEXT-IS/m-p/806421#M317714</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2022-04-06T22:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO REMOVE THE LAST TEXT AFTER REGION WHEN THE TEXT IS DECORATED</title>
      <link>https://communities.sas.com/t5/SAS-Programming/HOW-TO-REMOVE-THE-LAST-TEXT-AFTER-REGION-WHEN-THE-TEXT-IS/m-p/806423#M317716</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You have a LINE statement in the COMPUTE block for REGION. That won't work. PROC REPORT executes the COMPUTE block for the REGION column on EVERY row for EVERY value of REGION. PROC REPORT won't write your LINE statement on EVERY row. That's the meaning of the message. You can only use the LINE statement in a COMPUTE block that's associated with a "break" location, like BEFORE, or AFTER or at the top of the report or the bottom of the report. I think you might want your LINE in a COMPUTE BEFORE REGION??? Not sure exactly what you're trying to do or why you're changing the Region from Central America into USA, that doesn't make sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I don't understand why you can't remove the lines you want because you create the temporary variables TEXT1 and TEXT2 and then use those variables in LINE statements. If you want to remove them, change the LINE statements.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 00:04:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/HOW-TO-REMOVE-THE-LAST-TEXT-AFTER-REGION-WHEN-THE-TEXT-IS/m-p/806423#M317716</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-04-07T00:04:26Z</dc:date>
    </item>
  </channel>
</rss>

