<?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: Underline beneath the Span Labels in Proc Report Column Statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/950797#M371763</link>
    <description>&lt;P&gt;Can you provide an example of what you want to create?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I actually don't see anything UNDERLINING in your code. You are using style options that affect cell borders appearnace and cell borders are the width of a cell. So adjacent "cells" will appear connected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Nov 2024 15:59:15 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2024-11-14T15:59:15Z</dc:date>
    <item>
      <title>Underline beneath the Span Labels in Proc Report Column Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/950766#M371756</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to generate table with Span Headers across different column variables. I am to add the labels and get the line beneath the span label but it looks like the underline seems to be connected to the next group. Is there a way to restrict the underline and clearly show that spanlabel "Asia" appears over column Lexus and Toyota and "Europe" appears over column Audi and BMW. Currently both underlines seems are connected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code I am using.&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;where origin in ("Asia","Europe");&lt;BR /&gt;if make in ("Audi", "BMW","Lexus","Toyota");&lt;BR /&gt;if drivetrain="All";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=cars out=x nodupkey;&lt;BR /&gt;by make origin;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=cars;&lt;BR /&gt;by type model drivetrain;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc transpose data=cars out=cars2;&lt;BR /&gt;by type model drivetrain;&lt;BR /&gt;id make;&lt;BR /&gt;var enginesize;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data cars2;&lt;BR /&gt;set cars2;&lt;BR /&gt;x=1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;options leftmargin=0.75in rightmargin=0.75in topmargin=0.75in bottommargin=0.75in;&lt;BR /&gt;ods escapechar="^";&lt;BR /&gt;proc template;&lt;BR /&gt;define style style_rtf;&lt;BR /&gt;parent=styles.rtf;&lt;BR /&gt;style SystemTitle /&lt;BR /&gt;font_face="Times New Roman"&lt;BR /&gt;font_size=8pt&lt;BR /&gt;font_weight=light&lt;BR /&gt;font_style=roman&lt;BR /&gt;foreground=black&lt;BR /&gt;background=white&lt;BR /&gt;;&lt;BR /&gt;style SystemFooter /&lt;BR /&gt;font_face="Times New Roman"&lt;BR /&gt;font_size=8pt&lt;BR /&gt;font_weight=light&lt;BR /&gt;font_style=roman&lt;BR /&gt;foreground=black&lt;BR /&gt;background=white&lt;BR /&gt;;&lt;BR /&gt;style Header /&lt;BR /&gt;font_face="Times New Roman"&lt;BR /&gt;font_size=8pt&lt;BR /&gt;font_weight=light&lt;BR /&gt;font_style=roman&lt;BR /&gt;foreground=black&lt;BR /&gt;background=white&lt;BR /&gt;;&lt;BR /&gt;style Data /&lt;BR /&gt;font_face="Times New Roman"&lt;BR /&gt;font_size=8pt&lt;BR /&gt;font_weight=light&lt;BR /&gt;font_style=roman&lt;BR /&gt;foreground=black&lt;BR /&gt;background=white&lt;BR /&gt;;&lt;BR /&gt;style Table /&lt;BR /&gt;foreground=black&lt;BR /&gt;background=white&lt;BR /&gt;cellspacing=0&lt;BR /&gt;cellpadding=3&lt;BR /&gt;frame=hsides&lt;BR /&gt;rules=groups&lt;BR /&gt;;&lt;BR /&gt;style Body /&lt;BR /&gt;foreground=black&lt;BR /&gt;background=white&lt;BR /&gt;;&lt;BR /&gt;style SysTitleAndFooterContainer /&lt;BR /&gt;cellspacing=0&lt;BR /&gt;;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;ods rtf file="spanheader.rtf" style=style_rtf;&lt;BR /&gt;&lt;BR /&gt;title1 'Western Region Summary';&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc report data=cars2 nowd style(report)={cellwidth=100%};&lt;BR /&gt;column type model drivetrain ("Asia" ('^S={borderbottomwidth=1 borderbottomcolor=black}' Lexus Toyota)) ("Europe" ('^S={borderbottomwidth=1 borderbottomcolor=black}' Audi BMW)) x;&lt;BR /&gt;define Type / style(column)={width=40mm} group;&lt;BR /&gt;define drivetrain / "Drive Train" group style(column)={width=30mm};&lt;BR /&gt;define model / "Model" group style(column)={width=30mm} ;&lt;BR /&gt;define Lexus / display style(column)={width=10mm} ;&lt;BR /&gt;define Toyota / display style(column)={width=10mm} ;&lt;BR /&gt;define Audi / display style(column)={width=10mm} ;&lt;BR /&gt;define bmw / display style(column)={width=10mm} ;&lt;BR /&gt;define x/ noprint;&lt;BR /&gt;run;&lt;BR /&gt;ods rtf close;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 12:54:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/950766#M371756</guid>
      <dc:creator>usanj</dc:creator>
      <dc:date>2024-11-14T12:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Underline beneath the Span Labels in Proc Report Column Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/950797#M371763</link>
      <description>&lt;P&gt;Can you provide an example of what you want to create?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I actually don't see anything UNDERLINING in your code. You are using style options that affect cell borders appearnace and cell borders are the width of a cell. So adjacent "cells" will appear connected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 15:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/950797#M371763</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-11-14T15:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Underline beneath the Span Labels in Proc Report Column Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/950831#M371783</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I assume that you want to see this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1731608678369.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/102220i742534EAF00B731C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1731608678369.png" alt="Cynthia_sas_0-1731608678369.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;with a slight break between the header for Asia and the one for Europe.&lt;/P&gt;
&lt;P&gt;In this example, I did NOT use your template. Instead I just used the simple journal style and made some slight modifications to your REPORT code. First, to avoid warning messages and notes in the log, I changed all of your GROUP usage items to ORDER usage. Next, I did not see the purpose for the X variable, so I didn't use it at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; However, to insert the slight space, I just created a helper variable called BLANKVAR that was computed. Journal style turns off all interior table lines by default, so by inserting the new helper BLANKVAR between Asia and Europe columns, it makes the report look like there's a break and there&amp;nbsp; is, you just need to manually control it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Since you have width=100%, I did not see the need to overcontrol the column widths except that DRIVETRAIN needed to be a bit wider, so I left that. And, then I had to use BLANKVAR in the COLUMN statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The biggest change I made was in the placement of your border overrides. If you want to alter the borders of the spanning header text strings so they are looking like an underline, then your ODS ESCAPECHAR override needs to appear BEFORE the string, not after as you originally showed. Here's the changed code:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1731609084348.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/102221iC688E45B3100EAA9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1731609084348.png" alt="Cynthia_sas_1-1731609084348.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I'm also pasting the code below, with an example of how Journal style looks using TEXTDECORATION. But I wanted to provide you with the annotated changes too.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
** did not change data creation steps although X variable does not seem to be needed;
  
options missing=' ' orientation=portrait 
        topmargin=0.75in bottommargin=0.75in leftmargin=0.5in rightmargin=0.5in;
ods escapechar='^';

ods rtf file="c:\temp\span_journal.rtf" style=journal;

title1 'Western Region Summary (journal style use borderchanges)';
proc report data=cars2 nowd style(report)={width=100%}
            style(header)={font_style=roman font_weight=bold};
column type model drivetrain  ('^S={borderbottomwidth=1 borderbottomcolor=black}Asia' (Lexus Toyota)) 
       blankvar
       ('^S={borderbottomwidth=1 borderbottomcolor=black}Europe' (Audi BMW)) ;
define Type / order;
define drivetrain / "Drive Train" order style(column)={width=30mm};
define model / "Model" order ;
define Lexus / display ;
define Toyota / display  ;
define blankvar / computed ' ';
define Audi / display ;
define bmw / display ;
compute blankvar/character length=15;
  blankvar = '^{nbspace 3} ';
endcomp;
run;


title1 'Western Region Summary (journal style show textdecoration)';
proc report data=cars2 nowd style(report)={width=100%}
     style(header)={textdecoration=underline font_style=roman font_weight=bold};
column type model drivetrain ("Asia" (Lexus Toyota)) ("Europe" (Audi BMW)) ;
define Type / order;
define drivetrain / "Drive Train" order style(column)={width=30mm};
define model / "Model" order ;
define Lexus / display ;
define Toyota / display  ;
define Audi / display ;
define bmw / display ;
run;

ods rtf close;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Nov 2024 18:34:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/950831#M371783</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2024-11-14T18:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Underline beneath the Span Labels in Proc Report Column Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/950907#M371799</link>
      <description>&lt;P&gt;You could try RTF code&amp;nbsp;&amp;nbsp;^R'\brdrb\brdrs\brdrw15&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  
data cars;
set sashelp.cars;
where origin in ("Asia","Europe");
if make in ("Audi", "BMW","Lexus","Toyota");
if drivetrain="All";
run;

proc sort data=cars out=x nodupkey;
by make origin;
run;

proc sort data=cars;
by type model drivetrain;
run;

proc transpose data=cars out=cars2;
by type model drivetrain;
id make;
var enginesize;
run;

data cars2;
set cars2;
x=1;
run;
options missing=' ' orientation=portrait 
        topmargin=0.75in bottommargin=0.75in leftmargin=0.5in rightmargin=0.5in;
ods escapechar='^';

ods rtf file="c:\temp\span_journal.rtf" style=journal;

title1 'Western Region Summary (journal style use borderchanges)';
proc report data=cars2 nowd style(report)={width=100%}
            style(header)={font_style=roman font_weight=bold};
column type model drivetrain  ("^R'\brdrb\brdrs\brdrw15 'Asia" (Lexus Toyota)) 
                               ("^R'\brdrb\brdrs\brdrw15 'Europe" (Audi BMW)) ;
run;

ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1731635888237.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/102256i1B08E3DA08A2F379/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1731635888237.png" alt="Ksharp_0-1731635888237.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 01:58:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/950907#M371799</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-11-15T01:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Underline beneath the Span Labels in Proc Report Column Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/951054#M371828</link>
      <description>&lt;P&gt;Hi Cynthia,&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for taking time and providing a working solution.&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;</description>
      <pubDate>Mon, 18 Nov 2024 08:47:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/951054#M371828</guid>
      <dc:creator>usanj</dc:creator>
      <dc:date>2024-11-18T08:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Underline beneath the Span Labels in Proc Report Column Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/951056#M371830</link>
      <description>&lt;P&gt;Hi Ksharp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution mentioned works as expected for RTF but for PDF do we have something similar control words we can use?&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;</description>
      <pubDate>Mon, 18 Nov 2024 09:12:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/951056#M371830</guid>
      <dc:creator>usanj</dc:creator>
      <dc:date>2024-11-18T09:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Underline beneath the Span Labels in Proc Report Column Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/951058#M371831</link>
      <description>Nope. If you want PDF file then try Cynthia 's solution.&lt;BR /&gt;or you could try to SAVE AS this rtf file into a PDF file in the WORD menu.</description>
      <pubDate>Mon, 18 Nov 2024 09:14:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Underline-beneath-the-Span-Labels-in-Proc-Report-Column/m-p/951058#M371831</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-11-18T09:14:34Z</dc:date>
    </item>
  </channel>
</rss>

