<?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 and creating different formats for each line statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940616#M369183</link>
    <description>the style statement does not work on line statements.</description>
    <pubDate>Fri, 23 Aug 2024 13:53:36 GMT</pubDate>
    <dc:creator>tgleghorn</dc:creator>
    <dc:date>2024-08-23T13:53:36Z</dc:date>
    <item>
      <title>Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940524#M369154</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using proc report to write out to an xlsx workbook.&amp;nbsp; &amp;nbsp;There are 5 footnotes that are required at the bottom left of the worksheet.&amp;nbsp; All 5 lines require a different format (background color, font color, font style).&amp;nbsp; &amp;nbsp;The / style statement does not work.. I am just getting errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;compute after population ;&lt;BR /&gt;length text1 text2 text3 text4 text5 $100;&lt;BR /&gt;if population in ('SCO','NHMCR') then do;&lt;BR /&gt;text1 = '* = STARS Clinical Outcomes Measure';&lt;BR /&gt;text2 = '* CDC Poor Control is an inverse measure - lower is better';&lt;BR /&gt;text3 = 'Dark yellow indicates current rate is better than MY 2022 final rate.';&lt;BR /&gt;text4 = 'Bold measures - triple weighted';&lt;BR /&gt;text5 = 'TRC - 2 Star weights - Average of submeasure and Med Rec';&lt;BR /&gt;end;&lt;BR /&gt;else if population in ('MH','NH') then do;&lt;BR /&gt;text1 = '*-Triple weighted measure';&lt;BR /&gt;text2 = 'Withhold measure';&lt;BR /&gt;text3 = '';&lt;BR /&gt;text4 = '';&lt;BR /&gt;text5 = '';&lt;BR /&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;text1 = ' ';&lt;BR /&gt;text2 = ' ';&lt;BR /&gt;text3 = ' ';&lt;BR /&gt;text4 = ' ';&lt;BR /&gt;text5 = ' ';&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /** each of these line statements need a different format **/&lt;BR /&gt;line text1 $char100. / style = [&amp;amp;FlagStyle just=left];&lt;BR /&gt;line text2 $char100.;&lt;BR /&gt;line text3 $char100.;&lt;BR /&gt;line text4 $char100.;&lt;BR /&gt;line text5 $char100.;&lt;BR /&gt;endcomp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 18:09:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940524#M369154</guid>
      <dc:creator>tgleghorn</dc:creator>
      <dc:date>2024-08-22T18:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940547#M369161</link>
      <description>&lt;P&gt;Data, in the form of a working data step.&lt;/P&gt;
&lt;P&gt;Complete rest of the Procedure. It is entirely too easy for use to make a &lt;STRONG&gt;guess&lt;/STRONG&gt; about where something is in a report body and be incorrect. Resulting in solutions that will not actually work.&lt;/P&gt;
&lt;P&gt;List of the properties for which "line". If we don't know what to create when how can we get any sort of solution?&lt;/P&gt;
&lt;P&gt;And if you are going to place information in Macro variables then include the definitions of ALL the macro variables to be used and which line they are to be used with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And best would be to provide an example of what the result should look like given the example data set.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 21:10:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940547#M369161</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-08-22T21:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940557#M369165</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file='c:\temp\temp.xlsx';
ods escapechar='~';
proc report data=sashelp.class nowd;
columns sex age weight;
define sex/group;
define age/display;
compute after sex/style={just=l};
line '~{style [foreground=green fontsize=12]xxxxxxxxxx} ~n~{style [foreground=blue fontweight=bold]yyyyyyyyy}';
endcomp;
run;
ods excel 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-1724375164432.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/99582i850F1C45AD03B42B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1724375164432.png" alt="Ksharp_0-1724375164432.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 01:06:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940557#M369165</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-08-23T01:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940561#M369168</link>
      <description>&lt;P&gt;Hi, Another way to do this conditionally with multiple LINE statements, shown below using just 3 groups from SASHELP.CLASS:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1724376729106.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/99583i12A70E3F5CABC34A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1724376729106.png" alt="Cynthia_sas_0-1724376729106.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I didn't use page breaks or BY groups or&amp;nbsp; put each age on a new sheet just so it would make all 3 groups visible in one screen shot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Here's the code I used:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file='c:\temp\style_line.xlsx'
    options(embedded_titles='yes');
ods escapechar='^';
  
proc report data=sashelp.class
  style(lines)={just=l font_weight=bold vjust=m}
  style(column)={protectspecialchars=off};
title 'The title';
where age in (11,12,13);
column age name sex height weight;
define age / order;
define name / order;
define sex / display;
define height / display;
define weight / display;
compute after age;
  length tline1 tline2 tline3 $100;
  if age = 11 then do;
     tline1 = "^{style[color=red]Line 1 in PROC REPORT} (*ESC*){NEWLINE}" ;
	 lg1 = length(tline1);
     tline2 = "^{style[color=purple]Line 2 in PROC REPORT} (*ESC*){NEWLINE}" ;
	 lg2 = length(tline2);
     tline3 = "^{style[color=turquoise]Line 3 in PROC REPORT} (*ESC*){NEWLINE}" ;
	 lg3 = length(tline3);
  end;
  else if age = 12 then do;
     tline1 = "^{style[color=black]Line 1 in PROC REPORT} (*ESC*){NEWLINE}" ;
	 lg1 = length(tline1);
     tline2 = "^{style[color=black]Have Line 2 but No Line 3}" ;
	 lg2 = length(tline2);
     tline3 = ' ';
	 lg3 = 0;
  end;
  else if age = 13 then do;
     tline1 = "^{style[color=purple]Line 1 in PROC REPORT} (*ESC*){NEWLINE}" ;
	 lg1 = length(tline1);
     tline2 = "  (*ESC*){NEWLINE}";
	 lg2 = length(tline2);
     tline3 = "^{style[color=red]Line 3 (blank for line 2)}" ;
	 lg3 = length(tline3);
  end;
  line tline1 $varying. lg1;
  line tline2 $varying. lg2;
  line tline3 $varying. lg3;
endcomp;
run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 01:33:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940561#M369168</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2024-08-23T01:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940593#M369176</link>
      <description>How do I put the style with the actual text. tline1 = 'bold measures - triple weighyed'; would it be tline1 = "Bold measures - triple weighyed ^{style[color=purple]Line 1 in PROC REPORT} (*ESC*){NEWLINE}" ;</description>
      <pubDate>Fri, 23 Aug 2024 12:21:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940593#M369176</guid>
      <dc:creator>tgleghorn</dc:creator>
      <dc:date>2024-08-23T12:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940596#M369177</link>
      <description>Duh.. I just saw in your code where to put the actual text. my bad.</description>
      <pubDate>Fri, 23 Aug 2024 12:31:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940596#M369177</guid>
      <dc:creator>tgleghorn</dc:creator>
      <dc:date>2024-08-23T12:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940604#M369179</link>
      <description>it is ignoring my background colors.&lt;BR /&gt;&lt;BR /&gt;compute after population ;&lt;BR /&gt;&lt;BR /&gt;if population in ('SCO','NHMCR') then do;&lt;BR /&gt;text1 = "^{style[background=black color=white] * = STARS Clinical Outcomes Measure} (*ESC*){NEWLINE}" ;&lt;BR /&gt;lg1 = length(text1);&lt;BR /&gt;text2 = "^{style[background=grey color=black] * CDC Poor Control is an inverse measure - lower is better} (*ESC*){NEWLINE}";&lt;BR /&gt;lg2 = length(text2);&lt;BR /&gt;text3 = "^{style[background=yellow color=black] Dark yellow indicates current rate is better than MY 2022 final rate.} (*ESC*){NEWLINE}";&lt;BR /&gt;lg3 = length(text3);&lt;BR /&gt;text4 = "^{style[color=black] Bold measures - triple weighted } (*ESC*){NEWLINE}";&lt;BR /&gt;lg4 = length(text4);&lt;BR /&gt;text5 = "^{style[color=black] TRC - 2 Star weights - Average of submeasure and Med Rec} (*ESC*){NEWLINE}";&lt;BR /&gt;lg5 = length(text5);&lt;BR /&gt;end;&lt;BR /&gt;else if population in ('MH','NH') then do;&lt;BR /&gt;text1 = "^{style[color=black] *-Triple weighted measure(*ESC*){NEWLINE}";&lt;BR /&gt;lg1 = length(text1);&lt;BR /&gt;text2 = "^{style[color=black] Withhold measure} (*ESC*){NEWLINE}";&lt;BR /&gt;lg2 = length(text2);&lt;BR /&gt;text3 = "^{style[color=black] } (*ESC*){NEWLINE}";&lt;BR /&gt;lg3 = length(text3);&lt;BR /&gt;text4 = "^{style[color=black] } (*ESC*){NEWLINE}";&lt;BR /&gt;lg3 = length(text4);&lt;BR /&gt;text5 = "^{style[color=black] } (*ESC*){NEWLINE}";&lt;BR /&gt;lg5 = length(text5);&lt;BR /&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;text1 = ' ';&lt;BR /&gt;lg1 = length(text1);&lt;BR /&gt;text2 = ' ';&lt;BR /&gt;lg2 = length(text2);&lt;BR /&gt;text3 = '';&lt;BR /&gt;lg3 = length(text3);&lt;BR /&gt;text4 = '';&lt;BR /&gt;lg3 = length(text4);&lt;BR /&gt;text5 = '';&lt;BR /&gt;lg5 = length(text5);&lt;BR /&gt;end;&lt;BR /&gt;line text1 $varying. lg1;&lt;BR /&gt;line text2 $varying. lg2;&lt;BR /&gt;line text3 $varying. lg3;&lt;BR /&gt;line text4 $varying. lg4;&lt;BR /&gt;line text5 $varying. lg5;&lt;BR /&gt;&lt;BR /&gt;endcomp;</description>
      <pubDate>Fri, 23 Aug 2024 13:06:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940604#M369179</guid>
      <dc:creator>tgleghorn</dc:creator>
      <dc:date>2024-08-23T13:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940607#M369180</link>
      <description />
      <pubDate>Fri, 23 Aug 2024 13:14:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940607#M369180</guid>
      <dc:creator>tgleghorn</dc:creator>
      <dc:date>2024-08-23T13:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940608#M369181</link>
      <description>This is what I am trying to accomplish with the line statements. I have everything working for each sheet except for the formatting of the line statements. The code that was provided as a solution appears to work except for the background color is not working.</description>
      <pubDate>Fri, 23 Aug 2024 13:16:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940608#M369181</guid>
      <dc:creator>tgleghorn</dc:creator>
      <dc:date>2024-08-23T13:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940616#M369183</link>
      <description>the style statement does not work on line statements.</description>
      <pubDate>Fri, 23 Aug 2024 13:53:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940616#M369183</guid>
      <dc:creator>tgleghorn</dc:creator>
      <dc:date>2024-08-23T13:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940623#M369185</link>
      <description>&lt;P&gt;I think in Proc Report Backgroundcolor is more of a CELL property. Which would mean you can't mix background colors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Separate compute blocks for different line perhaps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have also not provided enough code or data to allow us to even test code, making much harder to provide a solution that may work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/464163"&gt;@tgleghorn&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;the style statement does not work on line statements.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 14:07:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940623#M369185</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-08-23T14:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940627#M369186</link>
      <description>&lt;P&gt;Yes, That's correct. The multiple LINE statements are all writing into one big cell. So you cannot have a different background color for each line. That's why I only changed the foreground color. It is the same in PDF and RTF -- what is in one cell, no matter how many lines has one background color for the whole cell.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 14:34:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940627#M369186</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2024-08-23T14:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940694#M369203</link>
      <description>&lt;P&gt;You need to produce another DUMMY variable to get another LINE statement to produce TWO LINES.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
 set sashelp.class;
 dummy=ifn(sex='F',1,2);
run;

ods excel file='c:\temp\temp.xlsx';
ods escapechar='~';
proc report data=have nowd;
columns dummy sex age weight;
define dummy/order noprint;
define sex/order;
define age/display;
compute after sex/style={just=l foreground=green background=yellow fontsize=12};
line 'xxxxxxxxxx';
endcomp;
compute after dummy/style={just=l foreground=blue background=red};
line 'yyyyyyyyy';
endcomp;
run;
ods excel 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-1724479926523.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/99607i472BBD1EBBAD90D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1724479926523.png" alt="Ksharp_0-1724479926523.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Aug 2024 06:12:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940694#M369203</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-08-24T06:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940833#M369243</link>
      <description>&lt;P&gt;will give this a try...&amp;nbsp; I separated worksheets for each population and the formatting is different for all 4 worksheets.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;proc report data=Dashboard_&amp;amp;filedate.(drop=rate rate_pw rate_f rate_py) split='#'&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;style(header)=[background=&amp;amp;hdr. color=&amp;amp;fnt.]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; style(lines)={just=l font_weight=bold}&lt;/DIV&gt;&lt;DIV&gt;;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;where population="&amp;amp;pop.";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;columns ("&amp;amp;pop1. Weekly Hybrid Rates Dashboard" (population description measurekey denom_f numer_f rate_f /*rate_i*/))&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;("QMRM Data &amp;amp;filedate." (denom mrnum numer rate))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;("&amp;amp;curyr. Cut Points" (cutpt1 cutpt2 cutpt3 cutpt4))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;('Num Hits Needed to Reach' (hits1 hits2 hits3 hits4))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;("QMRM Data &amp;amp;pfiledat. " (denom_pw mrnum_pw numer_pw rate_pw rate_chg_pw))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;("QMRM Data &amp;amp;pywk."&amp;nbsp; &amp;nbsp;(denom_py mrnum_py numer_py rate_py rate_chg_py))&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line0 line1 line2 line3 line4 line5;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; define population / order noprint;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; define description / display&amp;nbsp; style(header)= [background=gray color=White] "MY&amp;amp;curyr. Measure Description";&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define measurekey / display style(header)= [background=gray color=White] 'Measure#Key';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define denom_f / analysis noprint;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define numer_f / analysis noprint;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define rate_f / computed format=percent8.2 style(header)= [background=gray color=White] "MY&amp;amp;pmyr.#Reported#Rate";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;*define rate_i / computed format=percent8.2 style(header)= [background=gray color=White] "Initial#Admin#Rate#MY&amp;amp;cmyr";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define denom /&amp;nbsp; analysis format=8. style(header)= [background=gray color=White] 'Den';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define mrnum / analysis&amp;nbsp; format=8. style(header)= [background=gray color=White] 'Med Rec#Num';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define numer / analysis format=8. style(header)= [background=gray color=White] 'Num';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define rate / computed format=percent8.2 style(header)= [background=gray color=White] 'Rate';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define cutpt1 / analysis format=percent8.2 style(header)= [background=gray color=White];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define cutpt2 / analysis format=percent8.2 style(header)= [background=gray color=White];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define cutpt3 / analysis format=percent8.2 style(header)= [background=gray color=White];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define cutpt4 / analysis format=percent8.2 style(header)= [background=gray color=White];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define hits1 / analysis format=8. style(header)= [background=gray color=White] '2_Stars';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define hits2 / analysis format=8. style(header)= [background=gray color=White] '3_Stars';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define hits3 / analysis format=8. style(header)= [background=gray color=White] '4_Stars';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define hits4 / analysis format=8. style(header)= [background=gray color=White] '5_Stars';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define denom_pw / analysis format=8. style(header)= [background=gray color=White] 'Den';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define mrnum_pw / analysis format=8. style(header)= [background=gray color=White] 'Med Rec#Num';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define numer_pw / analysis format=8. style(header)= [background=gray color=White] 'Num';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define rate_pw / computed format=percent8.2 style(header)= [background=gray color=White] "Prior#Week#MY&amp;amp;cmyr.#Rate";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define rate_chg_pw / computed format=percent8.2 style(header)= [background=gray color=White] "Chg from#MY&amp;amp;cmYR.#Prior#Week";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define denom_py / noprint;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define mrnum_py / noprint;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define numer_py / noprint;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define rate_py / computed format=percent8.2 style(header)= [background=gray color=White] "Prior Year#MY&amp;amp;pmyr. Rate#Same Week";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define rate_chg_py / computed format=percent8.2 style(header)= [background=gray color=White] "Chg from#MY&amp;amp;pmyr.#Same#Week";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;compute rate_f;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;rate_f=numer_f.sum/denom_f.sum;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if numer_f.sum/denom_f.sum le numer.sum/denom.sum then&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;call define(_col_,'style', "style=[background=&amp;amp;hdr. font_weight=bold]");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;else call define(_col_,'style', "style=[background=&amp;amp;tab.]");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;endcomp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;compute rate;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;rate=numer.sum/denom.sum;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if numer.sum/denom.sum ge numer_f.sum/denom_f.sum then&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;call define(_col_,'style', "style=[background=&amp;amp;hdr. font_weight=bold]");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;else call define(_col_,'style', "style=[background=&amp;amp;tab.]");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;endcomp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;compute hits1;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if hits1.sum=0 then&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;call define(_col_,'style', 'style=[background=dark gray]');&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;endcomp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;compute hits2;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if hits2.sum=0 then&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;call define(_col_,'style', 'style=[background=dark grey]');&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;endcomp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;compute hits3;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if hits3.sum=0 then&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;call define(_col_,'style', 'style=[background=dark grey]');&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;endcomp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;compute hits4;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if hits4.sum=0 then&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;call define(_col_,'style', 'style=[background=dark grey]');&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;endcomp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;compute rate_pw;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;rate_pw=numer_pw.sum/denom_pw.sum;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if numer_pw.sum/denom_pw.sum le numer.sum/denom.sum then&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;call define(_col_,'style', "style=[background=&amp;amp;hdr. font_weight=bold]");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;else call define(_col_,'style', "style=[background=&amp;amp;tab.]");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;endcomp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;compute rate_chg_pw;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;rate_chg_pw=(numer_pw.sum/denom_pw.sum) - (numer.sum/denom.sum);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;endcomp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;compute rate_py;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;rate_py=numer_py.sum/denom_py.sum;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if numer_py.sum/denom_py.sum le numer.sum/denom.sum then&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;call define(_col_,'style', "style=[background=&amp;amp;hdr. font_weight=bold]");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;else call define(_col_,'style', "style=[background=&amp;amp;tab.]");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;endcomp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;compute rate_chg_py;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;rate_chg_py=(numer_py.sum/denom_py.sum) - (numer.sum/denom.sum);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;endcomp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;compute after population;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; if population in ('SCO','NHMCR') then do;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; text1 = "^{style[background=black foreground=white] * = STARS Clinical Outcomes Measure} (*ESC*){NEWLINE}" ;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; lg1 = length(text1);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; text2 = "^{style[background=grey color=black] * CDC Poor Control is an inverse measure - lower is better} (*ESC*){NEWLINE}";&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; lg2 = length(text2);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; text3 = "^{style[background=yellow color=black] Dark yellow indicates current rate is better than MY 2022 final rate.} (*ESC*){NEWLINE}";&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; lg3 = length(text3);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; text4 = "^{style[color=black] Bold measures - triple weighted } (*ESC*){NEWLINE}";&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; lg4 = length(text4);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; text5 = "^{style[color=black] TRC - 2 Star weights - Average of submeasure and Med Rec} (*ESC*){NEWLINE}";&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; lg5 = length(text5);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; end;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;else if population in&amp;nbsp; ('MH','NH') then do;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; text1 = "^{style[color=black] *-Triple weighted measure(*ESC*){NEWLINE}";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; lg1 = length(text1);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; text2 = "^{style[color=black] Withhold measure} (*ESC*){NEWLINE}";&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; lg2 = length(text2);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; text3 = "^{style[color=black]&amp;nbsp; } (*ESC*){NEWLINE}";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; lg3 = length(text3);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; text4 = "^{style[color=black]&amp;nbsp; } (*ESC*){NEWLINE}";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; lg3 = length(text4);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; text5 = "^{style[color=black]&amp;nbsp; } (*ESC*){NEWLINE}";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; lg5 = length(text5);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;end;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; else do;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; text1 = ' ';&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; lg1 = length(text1);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; text2 = ' ';&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; lg2 = length(text2);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; text3 = '';&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; lg3 = length(text3);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; text4 = '';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; lg3 = length(text4);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; text5 = '';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; lg5 = length(text5);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; end;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; line text1 $varying. lg1;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; line text2 $varying. lg2;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;line text3 $varying. lg3;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;line text4 $varying. lg4;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;line text5 $varying. lg5;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;endcomp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 26 Aug 2024 12:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940833#M369243</guid>
      <dc:creator>tgleghorn</dc:creator>
      <dc:date>2024-08-26T12:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report and creating different formats for each line statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940836#M369244</link>
      <description>&lt;P&gt;creating the dummy worked.&amp;nbsp; &amp;nbsp;now just have to limit it to the one cell &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 12:55:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-and-creating-different-formats-for-each-line/m-p/940836#M369244</guid>
      <dc:creator>tgleghorn</dc:creator>
      <dc:date>2024-08-26T12:55:08Z</dc:date>
    </item>
  </channel>
</rss>

