<?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 Multi-select prompt - format labels on proc report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Multi-select-prompt-format-labels-on-proc-report/m-p/238735#M268321</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;I am hoping someone can help me. I am using a multi-select prompt within Enterprise Guide called "Display_Options" and have created the following proc report procedure (which is within a macro) that correctly outputs a table with the columns that are chosen in the prompt. However, the unformatted values of the prompt are displayed, and I would like to display the formatted values. I think I need to assign a format to the label which is in double quotes on the define statement, but I can't figure out how to do that.&lt;/P&gt;
&lt;P&gt;Here's the proc report code:&lt;/P&gt;
&lt;P&gt;proc report data=WORK.TEMP4 nowd;&lt;BR /&gt; column OrgName Provider_Name ProviderID &lt;BR /&gt; ConsistentItem1, (%do j=1 %to &amp;amp;Display_Options_count; &amp;amp;&amp;amp;Display_Options&amp;amp;j %end;) ;&lt;BR /&gt; define OrgName / group 'Organization Name' format=$100. missing order=formatted;&lt;BR /&gt; define Provider_Name / group 'Provider Name' format=$101. missing order=formatted;&lt;BR /&gt; define ProviderID / group 'Provider ID' format=$50. missing order=formatted; &lt;BR /&gt; define ConsistentItem1 / across '' order=data missing;&lt;BR /&gt; %do j=1 %to %eval(&amp;amp;Display_Options_count);&lt;BR /&gt; define &amp;amp;&amp;amp;Display_Options&amp;amp;j / analysis SUM format=5.2 "???" missing;&lt;BR /&gt; %end;&lt;BR /&gt; run;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Here's the format for the column labels for the possible values for the prompt:&lt;/P&gt;
&lt;P&gt;proc format; &lt;BR /&gt;value $Display MeanScore = 'Mean'&lt;BR /&gt; ItemN= 'Item n'&lt;BR /&gt; NumSIDs = 'Number of Respondents'&lt;BR /&gt; TopBox = 'Top Box';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;I would greatly appreciate any help on this.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;KelseyB&lt;/P&gt;</description>
    <pubDate>Thu, 10 Dec 2015 17:11:58 GMT</pubDate>
    <dc:creator>KelseyB</dc:creator>
    <dc:date>2015-12-10T17:11:58Z</dc:date>
    <item>
      <title>Multi-select prompt - format labels on proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multi-select-prompt-format-labels-on-proc-report/m-p/238735#M268321</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I am hoping someone can help me. I am using a multi-select prompt within Enterprise Guide called "Display_Options" and have created the following proc report procedure (which is within a macro) that correctly outputs a table with the columns that are chosen in the prompt. However, the unformatted values of the prompt are displayed, and I would like to display the formatted values. I think I need to assign a format to the label which is in double quotes on the define statement, but I can't figure out how to do that.&lt;/P&gt;
&lt;P&gt;Here's the proc report code:&lt;/P&gt;
&lt;P&gt;proc report data=WORK.TEMP4 nowd;&lt;BR /&gt; column OrgName Provider_Name ProviderID &lt;BR /&gt; ConsistentItem1, (%do j=1 %to &amp;amp;Display_Options_count; &amp;amp;&amp;amp;Display_Options&amp;amp;j %end;) ;&lt;BR /&gt; define OrgName / group 'Organization Name' format=$100. missing order=formatted;&lt;BR /&gt; define Provider_Name / group 'Provider Name' format=$101. missing order=formatted;&lt;BR /&gt; define ProviderID / group 'Provider ID' format=$50. missing order=formatted; &lt;BR /&gt; define ConsistentItem1 / across '' order=data missing;&lt;BR /&gt; %do j=1 %to %eval(&amp;amp;Display_Options_count);&lt;BR /&gt; define &amp;amp;&amp;amp;Display_Options&amp;amp;j / analysis SUM format=5.2 "???" missing;&lt;BR /&gt; %end;&lt;BR /&gt; run;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Here's the format for the column labels for the possible values for the prompt:&lt;/P&gt;
&lt;P&gt;proc format; &lt;BR /&gt;value $Display MeanScore = 'Mean'&lt;BR /&gt; ItemN= 'Item n'&lt;BR /&gt; NumSIDs = 'Number of Respondents'&lt;BR /&gt; TopBox = 'Top Box';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;I would greatly appreciate any help on this.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;KelseyB&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2015 17:11:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multi-select-prompt-format-labels-on-proc-report/m-p/238735#M268321</guid>
      <dc:creator>KelseyB</dc:creator>
      <dc:date>2015-12-10T17:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-select prompt - format labels on proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multi-select-prompt-format-labels-on-proc-report/m-p/238744#M268322</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;%do j=1 %to %eval(&amp;amp;Display_Options_count);
   %let t = %sysfunc(putc(&amp;amp;&amp;amp;Display_Options&amp;amp;j,$Display.));
   define &amp;amp;&amp;amp;Display_Options&amp;amp;j / analysis SUM format=5.2 "&amp;amp;t" missing;
 %end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This might get you started.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2015 17:57:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multi-select-prompt-format-labels-on-proc-report/m-p/238744#M268322</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-12-10T17:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-select prompt - format labels on proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multi-select-prompt-format-labels-on-proc-report/m-p/238752#M268323</link>
      <description>&lt;P&gt;This worked perfectly ballardw. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2015 18:49:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multi-select-prompt-format-labels-on-proc-report/m-p/238752#M268323</guid>
      <dc:creator>KelseyB</dc:creator>
      <dc:date>2015-12-10T18:49:02Z</dc:date>
    </item>
  </channel>
</rss>

