<?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: How to add a formatted line at the end of a proc report table? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-add-a-formatted-line-at-the-end-of-a-proc-report-table/m-p/843726#M26039</link>
    <description>&lt;P&gt;Thank you, Ksharp! Not exactly what I asked for, but you put me on the right track.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I finally did to solve the problem is that I added an extra line under the table, but without summarizing the values. Then I formatted the background and line colours of that line so that it gives an impression of a blue line at the end of the table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not a perfect solution since there will be a redundant row in the table. However, I do not think there exists a real solution except from manually formatting the table in Excel after the output has been generated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;compute after &lt;BR /&gt;/ &lt;BR /&gt;style={bordertopcolor= #1E00BE &lt;BR /&gt;bordertopwidth=10pt&lt;BR /&gt;bordertopstyle = solid &lt;BR /&gt;backgroundcolor= #ffffff &lt;BR /&gt;borderbottomcolor= #ffffff &lt;BR /&gt;borderleftcolor= #ffffff&lt;BR /&gt;borderrightcolor= #ffffff};&lt;BR /&gt;line ' ';&lt;BR /&gt;endcomp;&lt;BR /&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Nov 2022 07:42:28 GMT</pubDate>
    <dc:creator>Multipla99</dc:creator>
    <dc:date>2022-11-11T07:42:28Z</dc:date>
    <item>
      <title>How to add a formatted line at the end of a proc report table?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-add-a-formatted-line-at-the-end-of-a-proc-report-table/m-p/843348#M26036</link>
      <description>&lt;P&gt;I'm trying to produce some nice looking tables with the help of ODS Excel and Proc Report. You can see what I have acheived so far in the xlsx-file attached.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, now I would like to add a line at the end of the table. The line should be of the same format as the lines above and below the colum headers row.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone please advise me how to this? The code I'm using is attached below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;ods _all_ close;&lt;BR /&gt;goptions device=png;&lt;BR /&gt;ods excel &lt;BR /&gt;file="C:\Temp\SAS data.xlsx" &lt;BR /&gt;;&lt;BR /&gt;ods excel&lt;BR /&gt;options(sheet_name = "Class" &lt;BR /&gt;sheet_interval='none' &lt;BR /&gt;start_at = "B2" &lt;BR /&gt;absolute_column_width = "6,15,6,6,10,10") &lt;BR /&gt;;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;proc odstext;&lt;BR /&gt;p 'Data Set Class'&lt;BR /&gt;/ style =[fontsize=8pt fontfamily=roboto fontweight=bold];&lt;BR /&gt;run;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;proc report&lt;BR /&gt;data = sashelp.class&lt;BR /&gt;style(header)=[borderbottomcolor = #1E00BE&lt;BR /&gt;borderbottomstyle = solid&lt;BR /&gt;borderbottomwidth = 10pt&lt;BR /&gt;bordertopcolor = #1E00BE&lt;BR /&gt;bordertopstyle = solid&lt;BR /&gt;bordertopwidth = 10pt&lt;BR /&gt;fontsize=8pt fontfamily=roboto]&lt;BR /&gt;style(column)=[fontsize=8pt fontfamily=roboto vjust=c]&lt;BR /&gt;completerows&lt;BR /&gt;;&lt;BR /&gt;columns Name Sex Age Height Weight;&lt;BR /&gt;define Name&lt;BR /&gt;/ &lt;BR /&gt;style(header)={just=l borderrightcolor = #1E00BE&lt;BR /&gt;borderrightstyle = solid&lt;BR /&gt;borderrightwidth = 1pt} &lt;BR /&gt;style(column)={just=l borderrightcolor = #1E00BE&lt;BR /&gt;borderrightstyle = solid&lt;BR /&gt;borderrightwidth = 1pt};&lt;BR /&gt;define Sex&lt;BR /&gt;/ &lt;BR /&gt;style(header)={just=l borderrightcolor = #1E00BE&lt;BR /&gt;borderrightstyle = solid&lt;BR /&gt;borderrightwidth = 1pt} &lt;BR /&gt;style(column)={just=l borderrightcolor = #1E00BE&lt;BR /&gt;borderrightstyle = solid&lt;BR /&gt;borderrightwidth = 1pt};&lt;BR /&gt;define Age&lt;BR /&gt;/ &lt;BR /&gt;style(header)={just=r borderrightcolor = #1E00BE&lt;BR /&gt;borderrightstyle = solid&lt;BR /&gt;borderrightwidth = 1pt} &lt;BR /&gt;style(column)={just=r borderrightcolor = #1E00BE&lt;BR /&gt;borderrightstyle = solid&lt;BR /&gt;borderrightwidth = 1pt};&lt;BR /&gt;define Height&lt;BR /&gt;/ &lt;BR /&gt;style(header)={just=r borderrightcolor = #1E00BE&lt;BR /&gt;borderrightstyle = solid&lt;BR /&gt;borderrightwidth = 1pt} &lt;BR /&gt;style(column)={just=r borderrightcolor = #1E00BE&lt;BR /&gt;borderrightstyle = solid&lt;BR /&gt;borderrightwidth = 1pt};&lt;BR /&gt;define Weight&lt;BR /&gt;/ &lt;BR /&gt;style(header)={just=r} &lt;BR /&gt;style(column)={just=r};&lt;BR /&gt;run;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;ods excel close;&lt;BR /&gt;goptions reset=goptions;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Nov 2022 12:52:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-add-a-formatted-line-at-the-end-of-a-proc-report-table/m-p/843348#M26036</guid>
      <dc:creator>Multipla99</dc:creator>
      <dc:date>2022-11-09T12:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a formatted line at the end of a proc report table?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-add-a-formatted-line-at-the-end-of-a-proc-report-table/m-p/843567#M26038</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods _all_ close;
goptions device=png;
ods excel
file="C:\Temp\SAS data.xlsx"
;
ods excel
options(sheet_name = "Class"
sheet_interval='none'
start_at = "B2"
absolute_column_width = "6,15,6,6,10,10")
;
proc odstext;
p 'Data Set Class'
/ style =[fontsize=8pt fontfamily=roboto fontweight=bold];
run;
proc report nowd
data = sashelp.class
style(header)=[borderbottomcolor = #1E00BE
borderbottomstyle = solid
borderbottomwidth = 10pt
bordertopcolor = #1E00BE
bordertopstyle = solid
bordertopwidth = 10pt
fontsize=8pt fontfamily=roboto]
style(column)=[fontsize=8pt fontfamily=roboto vjust=c]
completerows
;
columns Name Sex Age Height Weight;
define Name
/
style(header)={just=l borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt}
style(column)={just=l borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt};
define Sex
/
style(header)={just=l borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt}
style(column)={just=l borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt};
define Age
/
style(header)={just=r borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt}
style(column)={just=r borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt};
define Height
/
style(header)={just=r borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt}
style(column)={just=r borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt};
define Weight
/
style(header)={just=r}
style(column)={just=r};

compute after ;
Name="Toatl";Sex='X';age.sum=99;weight.sum=99;height.sum=99;
endcomp;
rbreak after/summarize;
run;
ods excel close;
goptions reset=goptions;&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-1668080735893.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77162iD7040F946CBA9AAE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1668080735893.png" alt="Ksharp_0-1668080735893.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 11:45:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-add-a-formatted-line-at-the-end-of-a-proc-report-table/m-p/843567#M26038</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-11-10T11:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a formatted line at the end of a proc report table?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-add-a-formatted-line-at-the-end-of-a-proc-report-table/m-p/843726#M26039</link>
      <description>&lt;P&gt;Thank you, Ksharp! Not exactly what I asked for, but you put me on the right track.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I finally did to solve the problem is that I added an extra line under the table, but without summarizing the values. Then I formatted the background and line colours of that line so that it gives an impression of a blue line at the end of the table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not a perfect solution since there will be a redundant row in the table. However, I do not think there exists a real solution except from manually formatting the table in Excel after the output has been generated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;compute after &lt;BR /&gt;/ &lt;BR /&gt;style={bordertopcolor= #1E00BE &lt;BR /&gt;bordertopwidth=10pt&lt;BR /&gt;bordertopstyle = solid &lt;BR /&gt;backgroundcolor= #ffffff &lt;BR /&gt;borderbottomcolor= #ffffff &lt;BR /&gt;borderleftcolor= #ffffff&lt;BR /&gt;borderrightcolor= #ffffff};&lt;BR /&gt;line ' ';&lt;BR /&gt;endcomp;&lt;BR /&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 07:42:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-add-a-formatted-line-at-the-end-of-a-proc-report-table/m-p/843726#M26039</guid>
      <dc:creator>Multipla99</dc:creator>
      <dc:date>2022-11-11T07:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a formatted line at the end of a proc report table?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-add-a-formatted-line-at-the-end-of-a-proc-report-table/m-p/843748#M26040</link>
      <description>&lt;P&gt;You'd better post a picture to explain what you want to avoid misunderstanding .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;goptions device=png;
ods excel
file="C:\Temp\SAS data.xlsx"  
;
ods excel
options(sheet_name = "Class"
sheet_interval='none'
start_at = "B2"
absolute_column_width = "6,15,6,6,10,10")
;
proc odstext;
p 'Data Set Class'
/ style =[fontsize=8pt fontfamily=roboto fontweight=bold];
run;

%let dsid=%sysfunc(open(sashelp.class));
%let nobs=%sysfunc(attrn(&amp;amp;dsid.,nlobs));
%let dsid=%sysfunc(close(&amp;amp;dsid.));

proc report nowd
data = sashelp.class
style(header)=[borderbottomcolor = #1E00BE
borderbottomstyle = solid
borderbottomwidth = 10pt
bordertopcolor = #1E00BE
bordertopstyle = solid
bordertopwidth = 10pt
fontsize=8pt fontfamily=roboto]
style(column)=[fontsize=8pt fontfamily=roboto vjust=c]
completerows
;
columns Name Sex Age Height Weight;
define Name
/
style(header)={just=l borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt}
style(column)={just=l borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt};
define Sex
/
style(header)={just=l borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt}
style(column)={just=l borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt};
define Age
/
style(header)={just=r borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt}
style(column)={just=r borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt};
define Height
/
style(header)={just=r borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt}
style(column)={just=r borderrightcolor = #1E00BE
borderrightstyle = solid
borderrightwidth = 1pt};
define Weight
/
style(header)={just=r}
style(column)={just=r};


compute weight;
n+1;
if n=&amp;amp;nobs. then call define(_row_,'style','style={borderbottomcolor= #1E00BE borderbottomwidth=20}'); 
endcomp;
run;
ods excel close;
goptions reset=goptions;&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-1668167071788.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77200i34796EC3205CBABD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1668167071788.png" alt="Ksharp_0-1668167071788.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 11:44:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-add-a-formatted-line-at-the-end-of-a-proc-report-table/m-p/843748#M26040</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-11-11T11:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a formatted line at the end of a proc report table?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-add-a-formatted-line-at-the-end-of-a-proc-report-table/m-p/843802#M26041</link>
      <description>You managed to solve it, Ksharp! &lt;BR /&gt;I'm very impressed and, of course, most thankful.&lt;BR /&gt;Have a great day!</description>
      <pubDate>Fri, 11 Nov 2022 14:54:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-add-a-formatted-line-at-the-end-of-a-proc-report-table/m-p/843802#M26041</guid>
      <dc:creator>Multipla99</dc:creator>
      <dc:date>2022-11-11T14:54:30Z</dc:date>
    </item>
  </channel>
</rss>

