<?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/Compute block question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726578#M225785</link>
    <description>Thank you! I understand the limitations of your being able to troubleshoot this. I appreciate the suggestions!</description>
    <pubDate>Mon, 15 Mar 2021 22:57:24 GMT</pubDate>
    <dc:creator>biglerc</dc:creator>
    <dc:date>2021-03-15T22:57:24Z</dc:date>
    <item>
      <title>Proc Report/Compute block question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726544#M225763</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am fairly new to Proc Report and am struggling with a requirement.&amp;nbsp; I am using ODS to output a dataset to Excel, and I need to conditionally format a cell based on the value of another variable. (My code is below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Requirement&lt;/STRONG&gt;:&amp;nbsp; If the value of visnd = 1 then the FU30DALD variable should be grey for that row.&amp;nbsp; The whole row shouldn't be grey, just that cell under FU30DALD.&lt;/P&gt;&lt;P&gt;My dataset contains all the variables I am referencing in the compute block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this error in my log:&amp;nbsp;&lt;/P&gt;&lt;P&gt;"ERROR: Invalid column specification in CALL DEFINE" with&amp;nbsp; "NOTE: Argument 1 to function DEFINE(' '[12 of 100 characters shown],'style','style={backg'[12 of 27 characters shown]) at line 2 column 7 is invalid."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance is appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Current code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc report data=final nowd headline headskip spacing=3 split='|' missing ls=256 ps=42 ;&lt;/P&gt;&lt;P&gt;column dummy1 _all_ ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;define dummy1 / noprint;&lt;BR /&gt;define FU30DALD / display;&lt;BR /&gt;define visnd / display;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*if FU30 not done then grey out the FU30DALD cell;&lt;BR /&gt;compute dummy1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (visnd = 1) then do;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; call define (FU30DALD,'style','style={background=lightgray}');&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;end;&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 21:18:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726544#M225763</guid>
      <dc:creator>biglerc</dc:creator>
      <dc:date>2021-03-15T21:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report/Compute block question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726551#M225767</link>
      <description>&lt;P&gt;Does your variable FU30DALD ever have the value "12 of 100 characters shown" or have a format that would show that?&lt;/P&gt;
&lt;P&gt;From the documentation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="xis-refProc"&gt;
&lt;DIV class="xis-procStatement"&gt;
&lt;DIV class="xis-procStatementSyntax"&gt;
&lt;DIV class="xis-syntaxSimple"&gt;
&lt;DIV class="xis-syntaxLevel"&gt;&lt;SPAN class="xis-keyword"&gt;CALL DEFINE&lt;/SPAN&gt; (&lt;SPAN class="xis-argRequired"&gt;&lt;SPAN class="xis-choice"&gt;&lt;A title="Description of syntax: column-id" href="http://127.0.0.1:59495/help/proc.hlp/n1b1be5822k8nnn1s1ucv8fvpg3d.htm#n16zzevtugnp6gn1lwonik0b91fx" target="_blank"&gt;&lt;SPAN class="xis-userSuppliedValue"&gt;column-id &lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN class="xis-choice"&gt; | &lt;A title="Description of syntax: _ROW_" href="http://127.0.0.1:59495/help/proc.hlp/n1b1be5822k8nnn1s1ucv8fvpg3d.htm#n0tvhh8dvkybuln17ud5thvzrgwy" target="_blank"&gt;_ROW_, &lt;/A&gt;&lt;/SPAN&gt; &lt;SPAN class="xis-argOptional"&gt;&amp;lt; '&lt;SPAN class="xis-userSuppliedSyntaxValue"&gt; attribute-name&lt;/SPAN&gt;', &lt;SPAN class="xis-userSuppliedSyntaxValue"&gt; value&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="xis-syntaxDescription"&gt;
&lt;DIV class="xis-requiredArgGroup"&gt;
&lt;H3 id="p1v6waoc0sw66nn1hts28g80ahd9" class="xis-title"&gt;Required Arguments&lt;/H3&gt;
&lt;DIV id="n16zzevtugnp6gn1lwonik0b91fx" class="xis-argDescriptionPair"&gt;
&lt;H4 class="xis-argument"&gt;&lt;SPAN class="xis-userSuppliedValue"&gt;column-id&lt;/SPAN&gt;&lt;/H4&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;P class="xis-paraSimpleFirst"&gt;specifies a column name or a column number (that is, the position of the column from the left edge of the report). A column ID can be one of the following:&lt;/P&gt;
&lt;DIV class="xis-listUnordered"&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV id="n1bxcrsqn746dxn1kgzaej7b3l0m" class="xis-item"&gt;
&lt;DIV id="p0qqxix6f52oqnn1mqpanp0mdvsd" class="xis-paraSimpleFirst"&gt;&lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;a character literal &lt;FONT size="6"&gt;(in quotation marks)&lt;/FONT&gt; that is the column name&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV id="p1ntg5xwkoz9v4n13m5hldamst7m" class="xis-item"&gt;
&lt;DIV id="n04ww2pewnq7hin1lwg55zlhbdj1" class="xis-paraSimpleFirst"&gt;a character expression that resolves to the column name&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV id="n0frbnz1ugdi81n1ak34znhqz9gc" class="xis-item"&gt;
&lt;DIV id="n0f20n7wmm48gfn1kjfk5z3rp609" class="xis-paraSimpleFirst"&gt;a numeric literal that is the column number&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV id="n0wppv1q8tkbjmn1nd1wu8tj0m5e" class="xis-item"&gt;
&lt;DIV id="p17ovggc4v6alfn19r0z55yrlbnb" class="xis-paraSimpleFirst"&gt;a numeric expression that resolves to the column number&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV id="p1atib7lxba2mtn1ppdaj5yv1yrz" class="xis-item"&gt;
&lt;DIV id="n137btd4b85tb7n1722bhxy9fk0h" class="xis-paraSimpleFirst"&gt;a name of the form '_C&lt;SPAN class="xis-userSuppliedValue"&gt;n&lt;/SPAN&gt;_', where &lt;SPAN class="xis-userSuppliedValue"&gt;n&lt;/SPAN&gt; is the column number&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV id="n0bp0pmtkcnx0nn1opoctqih7dd5" class="xis-item"&gt;
&lt;DIV id="n0cde39acppv0pn1q1cjew1qix12" class="xis-paraSimpleFirst"&gt;the automatic variable _COL_, which identifies the column that contains the report item that the compute block is attached to&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 15 Mar 2021 21:47:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726551#M225767</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-15T21:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report/Compute block question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726558#M225772</link>
      <description>Hello! Thank you for looking at my question! No, the values in the variable FU30DALD are dates in character format ($10), such as '2018-01-26'.</description>
      <pubDate>Mon, 15 Mar 2021 22:04:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726558#M225772</guid>
      <dc:creator>biglerc</dc:creator>
      <dc:date>2021-03-15T22:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report/Compute block question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726560#M225774</link>
      <description>You need to add quotes to the variable name. &lt;BR /&gt;&lt;BR /&gt;  call define ("FU30DALD",'style','style={background=lightgray}');&lt;BR /&gt;&lt;BR /&gt;If you're using a standard reference, like _col_, _row_ then you need to not include the quotes.</description>
      <pubDate>Mon, 15 Mar 2021 22:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726560#M225774</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-03-15T22:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report/Compute block question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726575#M225782</link>
      <description>Thanks, Reeza! The errors are gone in my log now. However, the color coding is not being applied. If you have any other ideas, I'm open to tring anything &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Mon, 15 Mar 2021 22:47:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726575#M225782</guid>
      <dc:creator>biglerc</dc:creator>
      <dc:date>2021-03-15T22:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report/Compute block question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726576#M225783</link>
      <description>Use square brackets instead of curly?&lt;BR /&gt;Try changing which variable you use in COMPUTE statement as well - there's an order of operations so try COMPUTE FU30ALDUD instead of COMPUTE DUMMY1. &lt;BR /&gt;&lt;BR /&gt;Sorry, I have nothing to test this with....</description>
      <pubDate>Mon, 15 Mar 2021 22:50:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726576#M225783</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-03-15T22:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report/Compute block question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726578#M225785</link>
      <description>Thank you! I understand the limitations of your being able to troubleshoot this. I appreciate the suggestions!</description>
      <pubDate>Mon, 15 Mar 2021 22:57:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Compute-block-question/m-p/726578#M225785</guid>
      <dc:creator>biglerc</dc:creator>
      <dc:date>2021-03-15T22:57:24Z</dc:date>
    </item>
  </channel>
</rss>

