<?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: Call Define to turn an entire row a color in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138514#M11098</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Depending on the rest of your code, it is possible that even with STYLE/MERGE, what you specify in the CALL DEFINE will NOT override something previously set in another COMPUTE block for a different column. So it sounds to me like you must have other code that is preventing your highlighting from working. As you can see if you run this code that uses SASHELP.CLASS, the _ROW_ does work.&lt;/P&gt;&lt;P&gt;Cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods html file='c:\temp\hilite.html';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc report data=sashelp.class nowd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; column name age sex height weight;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define name / order;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define age /display;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define sex / display;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define height / sum;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define weight / sum;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; compute age;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if substr(name,1,1) = 'J' and age = 12 then do;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_row_,'style','style={background=lightred}');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if age = 15 then do;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_row_,'style','style={background=lightyellow}');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods html close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jan 2015 20:21:42 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2015-01-26T20:21:42Z</dc:date>
    <item>
      <title>Call Define to turn an entire row a color</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138511#M11095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The last column in my proc report is an error code value. If the error code is gt than 0 then I want then entire row set to a background color of red.&lt;/P&gt;&lt;P&gt;This is my define:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;define last_error_code&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;/ display&lt;/TD&gt;&lt;TD&gt;'Error*Code';&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This is my compute block:&lt;/P&gt;&lt;P&gt;compute last_error_code;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if last_error_code gt 0 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_row_, "style/merge", "style=[background=errcol. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; font_weight=bold]");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The errcol. format is just white or red.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that only the the error code column and a couple of other columns are made red. Some stay the same color they were, others lose color completely, some turn a different color altogether.&amp;nbsp; The style/merge is my latest attempt, I didn't expect it to work and of course it doesn't.&lt;/P&gt;&lt;P&gt;Several other rows have compute blocks using call defito set style values, several columns also have compute blocks that also use call define to set style values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one is simple.. how can I turn the entire row red regardless of what else is being done?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance everyone&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 18:02:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138511#M11095</guid>
      <dc:creator>kcskaiser</dc:creator>
      <dc:date>2015-01-26T18:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Call Define to turn an entire row a color</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138512#M11096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you apparently have multiple style definitions the interaction is going to be hard to identify and resolve without the full code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 19:41:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138512#M11096</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-01-26T19:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Call Define to turn an entire row a color</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138513#M11097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the full code of my 'Proc Report'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc report data = logs3&lt;/P&gt;&lt;P&gt;&amp;nbsp; (where = (datepart(actual_start) ge &amp;amp;runmonth))&lt;/P&gt;&lt;P&gt;&amp;nbsp; style(summary)=[background=yellow] &lt;/P&gt;&lt;P&gt;&amp;nbsp; nowd split = '*' headskip;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; column workflow_name id2 id &lt;/P&gt;&lt;P&gt;&amp;nbsp; actual_start actual_start=startmin&lt;/P&gt;&lt;P&gt;&amp;nbsp; actual_start2&lt;/P&gt;&lt;P&gt;&amp;nbsp; session_timestamp session_timestamp=endmax&lt;/P&gt;&lt;P&gt;&amp;nbsp; duration time&lt;/P&gt;&lt;P&gt;&amp;nbsp; last_duration avg_duration&lt;/P&gt;&lt;P&gt;&amp;nbsp; successful_rows last_rows &lt;/P&gt;&lt;P&gt;&amp;nbsp; diff_from_last_rows avg_rows&lt;/P&gt;&lt;P&gt;&amp;nbsp; row_diff_from_avg pct_diff_from_avg&amp;nbsp; FAILED_SOURCE_ROWS&lt;/P&gt;&lt;P&gt;&amp;nbsp; next_place last_error_code&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define workflow_name / display noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define id2 / group noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define startmin / min f=datetime16. '*Start Time';&lt;/P&gt;&lt;P&gt;&amp;nbsp; define endmax / max f=datetime16. '*End Time';;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define id / display style = [background=lightgreen &lt;/P&gt;&lt;P&gt;&amp;nbsp; flyover=$idname.] '';&lt;/P&gt;&lt;P&gt;&amp;nbsp; define actual_start / order noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define actual_start2 / computed&amp;nbsp; noprint f= datetime16. '*Start Time';&lt;/P&gt;&lt;P&gt;&amp;nbsp; define session_timestamp / display noprint f= datetime16. '*End Time';&lt;/P&gt;&lt;P&gt;&amp;nbsp; define duration / analysis&amp;nbsp; noprint f= time12.2 '*Run Time';;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define time / computed&amp;nbsp; f= time12.2 '*Run Time';&lt;/P&gt;&lt;P&gt;&amp;nbsp; define last_duration / display f= time12.2 'Previous*Run Time';&lt;/P&gt;&lt;P&gt;&amp;nbsp; define avg_duration / display f= time12.2 'Average*Run Time';&lt;/P&gt;&lt;P&gt;&amp;nbsp; define successful_rows / analysis f= comma12. 'Rows*Processed';&lt;/P&gt;&lt;P&gt;&amp;nbsp; define last_rows / analysis f= comma12. 'Rows*Last Month';&lt;/P&gt;&lt;P&gt;&amp;nbsp; define diff_from_last_rows / analysis f= comma12. 'Diff From*Last Month';&lt;/P&gt;&lt;P&gt;&amp;nbsp; define avg_rows / display f= comma12. 'Average*Rows';&lt;/P&gt;&lt;P&gt;&amp;nbsp; define row_diff_from_avg / display noprint f= comma12. 'Diff From*Avg Month';&lt;/P&gt;&lt;P&gt;&amp;nbsp; define pct_diff_from_avg&amp;nbsp;&amp;nbsp; / display f= percent6.2 '% Diff of*Avg Month';&lt;/P&gt;&lt;P&gt;&amp;nbsp; define next_place / display noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define failed_source_rows&amp;nbsp; / analysis&amp;nbsp; f= comma12. 'Failed*Rows';&lt;/P&gt;&lt;P&gt;&amp;nbsp; define last_error_code / display 'Error*Code';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; break after id2 / page summarize;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; * Because I want to show all values, even those equal to the ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; * previous value, I used this:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; * &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://support.sas.com/kb/24/322.html"&gt;http://support.sas.com/kb/24/322.html&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compute actual_start2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if actual_start ne . then hold = actual_start;&lt;/P&gt;&lt;P&gt;&amp;nbsp; actual_start2 = hold;&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compute before ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; alltime = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compute before _page_ / &lt;/P&gt;&lt;P&gt;&amp;nbsp; style = {just=l FONTWEIGHT=bold color=blue &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; backgroundcolor=palegreen};&lt;/P&gt;&lt;P&gt;&amp;nbsp; txt = upcase(compbl(cat(workflow_name,' --&amp;gt; ',scan(id2,2,' '))));&lt;/P&gt;&lt;P&gt;&amp;nbsp; if workflow_name = scan(id2,2,' ') then txt = upcase(workflow_name);&lt;/P&gt;&lt;P&gt;&amp;nbsp; line txt $75.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compute id;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if id in ('A1','C10','D1','J7','K27','L6','Q_R','U15'&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'W6A','W6B') then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_row_, "style", &lt;/P&gt;&lt;P&gt;&amp;nbsp; "style=[backgroundcolor=lightgrey]");&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compute time;&lt;/P&gt;&lt;P&gt;&amp;nbsp; time = endmax - startmin;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call define(_col_, "style", "style=[background=lightblue&lt;/P&gt;&lt;P&gt;&amp;nbsp; font_weight=bold]");&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compute pct_diff_from_avg;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call define(_col_, "style", "style=[color=tlight. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font_weight=bold]");&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compute diff_from_last_rows;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call define(_col_, "style", "style=[color=tlight. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font_weight=bold]");&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compute successful_rows;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call define(_col_, "style", "style=[background=wheat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font_weight=bold]");&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compute last_rows;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call define(_col_, "style", "style=[background=KHAKI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font_weight=bold]");&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compute after _page_ /&lt;/P&gt;&lt;P&gt;&amp;nbsp; style = {just=l FONTWEIGHT=bold color=blue &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; backgroundcolor=white};&lt;/P&gt;&lt;P&gt;&amp;nbsp; txt = cat('Next Up: ',next_place);&lt;/P&gt;&lt;P&gt;&amp;nbsp; line txt $175.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compute after id2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; *call define(_row_,"style", " style = [background=yellow]");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; tottime = endmax-startmin;&lt;/P&gt;&lt;P&gt;&amp;nbsp; days&amp;nbsp; = floor((tottime)/(24*60*60));&lt;/P&gt;&lt;P&gt;&amp;nbsp; hours&amp;nbsp; = hour(tottime);&lt;/P&gt;&lt;P&gt;&amp;nbsp; minutes = minute(tottime);&lt;/P&gt;&lt;P&gt;&amp;nbsp; seconds = second(tottime);&lt;/P&gt;&lt;P&gt;&amp;nbsp; theline = compbl(cat(put(days,z2.),' days ',&lt;/P&gt;&lt;P&gt;&amp;nbsp; put(hours,z2.),' hours ',put(minutes,z2.),' minutes ',&lt;/P&gt;&lt;P&gt;&amp;nbsp; put(seconds,z2.),' seconds'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; alltime = alltime+tottime;&lt;/P&gt;&lt;P&gt;&amp;nbsp; adays = floor((alltime)/(24*60*60));&lt;/P&gt;&lt;P&gt;&amp;nbsp; ahours = hour(alltime);&lt;/P&gt;&lt;P&gt;&amp;nbsp; aminutes = minute(alltime);&lt;/P&gt;&lt;P&gt;&amp;nbsp; aseconds = second(alltime);&lt;/P&gt;&lt;P&gt;&amp;nbsp; thealine = compbl(cat(put(adays,z2.),' days ',&lt;/P&gt;&lt;P&gt;&amp;nbsp; put(ahours,z2.),' hours ',put(aminutes,z2.),' minutes ',&lt;/P&gt;&lt;P&gt;&amp;nbsp; put(aseconds,z2.),' seconds'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; line @1 'Group Time: ' +3 theline $char75.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; line @1 'Total Time: ' +4 thealine $char75.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compute last_error_code;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if last_error_code gt 0 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call define(_row_, "style/merge", "style=[background=errcol. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font_weight=bold]");&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 20:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138513#M11097</guid>
      <dc:creator>kcskaiser</dc:creator>
      <dc:date>2015-01-26T20:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Call Define to turn an entire row a color</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138514#M11098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Depending on the rest of your code, it is possible that even with STYLE/MERGE, what you specify in the CALL DEFINE will NOT override something previously set in another COMPUTE block for a different column. So it sounds to me like you must have other code that is preventing your highlighting from working. As you can see if you run this code that uses SASHELP.CLASS, the _ROW_ does work.&lt;/P&gt;&lt;P&gt;Cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods html file='c:\temp\hilite.html';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc report data=sashelp.class nowd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; column name age sex height weight;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define name / order;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define age /display;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define sex / display;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define height / sum;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; define weight / sum;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; compute age;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if substr(name,1,1) = 'J' and age = 12 then do;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_row_,'style','style={background=lightred}');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if age = 15 then do;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call define(_row_,'style','style={background=lightyellow}');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; endcomp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods html close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 20:21:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138514#M11098</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-01-26T20:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Call Define to turn an entire row a color</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138515#M11099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is exactly what I want to happen. And I'm guessing your right about something else blocking it. I've included all the code from my proc report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 20:40:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138515#M11099</guid>
      <dc:creator>kcskaiser</dc:creator>
      <dc:date>2015-01-26T20:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Call Define to turn an entire row a color</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138516#M11100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PROC REPORT considers column styles to be more important than row styles, so if any of the calls to DEFINE that change the column style are executed for the same row, the column style will override the row style.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 20:57:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138516#M11100</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2015-01-26T20:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Call Define to turn an entire row a color</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138517#M11101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This does indeed seem to be what is happening. But surly SAS has a way around this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 21:01:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138517#M11101</guid>
      <dc:creator>kcskaiser</dc:creator>
      <dc:date>2015-01-26T21:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Call Define to turn an entire row a color</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138518#M11102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Proc tabulate addresses this with the table option of Style_precedence but I don't see anything similar in Proc Report (as of 9.3 anyway).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 23:16:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138518#M11102</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-01-26T23:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Call Define to turn an entire row a color</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138519#M11103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The way I would work around it would be not to use _ROW_ and to change each of the variables on the row individually. Or, since it looks like there is quite a bit changing of rows and columns going on, I would probably try to reduce the scenarios that might "collide" against each other and code those in a more complex IF statement.&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2015 23:57:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138519#M11103</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-01-26T23:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Call Define to turn an entire row a color</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138520#M11104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked.. sort of. I thought I'd do it in a loop counting columns 1 to 13. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;This sounded promising until I tried it. The number of columns internal to SAS is &lt;/SPAN&gt;apparently&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; set by your columns statement not what is actually on the report. So it became 1 to 21. Using higher numbers causes all kinds of strange errors.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't get some columns to turn red no matter what I do. In my code they are time, successful_rows, and last_rows I have no idea why. Unless it has to do with them already being set to a color in a previous compute block. But that doesn't explain why it does override the color in the first column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;My compute block now looks like below:&lt;/P&gt;&lt;P&gt;compute last_error_code;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if last_error_code gt 0 then do i = 1 to 21;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call define(i, "style/merge", "style=[background=red &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font_weight=bold]");&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All but three columns are now red, better but not right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for this response it did help a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 14:52:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Call-Define-to-turn-an-entire-row-a-color/m-p/138520#M11104</guid>
      <dc:creator>kcskaiser</dc:creator>
      <dc:date>2015-01-27T14:52:34Z</dc:date>
    </item>
  </channel>
</rss>

