<?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 - Highlighting one whole row by certain criteria in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Highlighting-one-whole-row-by-certain-criteria/m-p/92175#M289884</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you copied that line from some PDF file or what not, sometimes hidden characters are in there that SAS won't know what to do with it.&lt;/P&gt;&lt;P&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jul 2013 17:33:09 GMT</pubDate>
    <dc:creator>AncaTilea</dc:creator>
    <dc:date>2013-07-26T17:33:09Z</dc:date>
    <item>
      <title>Proc Report - Highlighting one whole row by certain criteria</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Highlighting-one-whole-row-by-certain-criteria/m-p/92172#M289881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create a report where I would like one row, specifically the row that contains the missing observations, to be highlighted a different color than all the other rows.&amp;nbsp; I had thought that I had a solution, however I continually get an error message saying that the "Statement is not valid or it is used out of proper order."&amp;nbsp; Any help you can provide me with would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;TITLE "Birth Weight by Maternal Race / Ethnicity";&lt;/P&gt;&lt;P&gt;PROC REPORT DATA = bw_all2 NOWD STYLE(HEADER)=[BACKGROUND=LIGHTBLUE];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COLUMN bwcat miss black white hispanic other total;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEFINE bwcat / "Birth Weight Category" ORDER CENTER FORMAT=cat.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEFINE miss / "Missing" DISPLAY CENTER;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEFINE black / "African American" DISPLAY CENTER;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEFINE white / "Caucasian" DISPLAY CENTER;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEFINE other / "Other" DISPLAY CENTER;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEFINE total / "Total" DISPLAY CENTER:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COMPUTE bwcat;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF bwcat = 1 THEN CALL DEFINE (_ROW_,"style","Style=[BACKGROUND=LIGHTGREY]");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDCOMP;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 15:52:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Highlighting-one-whole-row-by-certain-criteria/m-p/92172#M289881</guid>
      <dc:creator>Katie</dc:creator>
      <dc:date>2013-07-26T15:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report - Highlighting one whole row by certain criteria</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Highlighting-one-whole-row-by-certain-criteria/m-p/92173#M289882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, in your code, &lt;EM&gt;bwcat = 1&lt;/EM&gt; means that bwcat is missing?&lt;/P&gt;&lt;P&gt;When I ran this little piece of code (see below) it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data temp;&lt;/P&gt;&lt;P&gt;set sashelp.class;&lt;/P&gt;&lt;P&gt;if sex = "M" then sex = "";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;ods pdf file = "&amp;amp;file_path.\my_file.pdf";&lt;/P&gt;&lt;P&gt;TITLE "No title";&lt;/P&gt;&lt;P&gt;PROC REPORT DATA = temp NOWD STYLE(HEADER)=[BACKGROUND=LIGHTBLUE];&lt;/P&gt;&lt;P&gt;column sex ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COMPUTE sex;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF sex = "" then call define (_ROW_,"style","Style=[BACKGROUND=red]");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDCOMP;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;ods pdf close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So...I wonder what is wrong...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anca.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 17:16:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Highlighting-one-whole-row-by-certain-criteria/m-p/92173#M289882</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2013-07-26T17:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report - Highlighting one whole row by certain criteria</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Highlighting-one-whole-row-by-certain-criteria/m-p/92174#M289883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Anca,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason when I was specifying that I wanted to change a _ROW_ it was not working.&amp;nbsp; But I deleted that line of code, rewrote it and now it seems to work okay.&amp;nbsp; I find it very strange.&amp;nbsp; There must have been a mysterious unknown typo that I could not find.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 17:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Highlighting-one-whole-row-by-certain-criteria/m-p/92174#M289883</guid>
      <dc:creator>Katie</dc:creator>
      <dc:date>2013-07-26T17:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report - Highlighting one whole row by certain criteria</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Highlighting-one-whole-row-by-certain-criteria/m-p/92175#M289884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you copied that line from some PDF file or what not, sometimes hidden characters are in there that SAS won't know what to do with it.&lt;/P&gt;&lt;P&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 17:33:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Highlighting-one-whole-row-by-certain-criteria/m-p/92175#M289884</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2013-07-26T17:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report - Highlighting one whole row by certain criteria</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Highlighting-one-whole-row-by-certain-criteria/m-p/92176#M289885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post your error log? The following code inspired by yours works for me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods pdf file="c:\test.pdf";&lt;/P&gt;&lt;P&gt;proc report data=sashelp.heart(obs=20) NOWD STYLE(HEADER)=[BACKGROUND=LIGHTBLUE];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column status ageatdeath;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define status / "test column1" ORDER CENTER;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define ageatdeath / "test missing formating" DISPLAY CENTER;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; compute ageatdeath;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ageatdeath=. then call define(_ROW_, "style", "style=[BACKGROUND=LIGHTGREY]");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;ods pdf close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. if you copy pasted your code here, I shall mention that the last DEFINE line ends with column instead of semi column...that could be your error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 17:50:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Highlighting-one-whole-row-by-certain-criteria/m-p/92176#M289885</guid>
      <dc:creator>Vince28_Statcan</dc:creator>
      <dc:date>2013-07-26T17:50:16Z</dc:date>
    </item>
  </channel>
</rss>

