<?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: Hiding by variable from proc report output in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Hiding-by-variable-from-proc-report-output/m-p/581367#M23178</link>
    <description>Have you tried OPTIONS NOBYLINE?&lt;BR /&gt;</description>
    <pubDate>Thu, 15 Aug 2019 11:29:16 GMT</pubDate>
    <dc:creator>jimhorne</dc:creator>
    <dc:date>2019-08-15T11:29:16Z</dc:date>
    <item>
      <title>Hiding by variable from proc report output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Hiding-by-variable-from-proc-report-output/m-p/581366#M23177</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a fake by variable in order to be able to name sheets using #byval1 in ods excel output while using multiple proc report calls.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file="foo.xlsx" options(sheet_name="#byval1");

proc report data=foo;
by dsname;
quit;

proc report data=bar;
by dsname;
quit;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;While it worked in terms of giving the sheets human-readable names, I now have dsname=foo present as subtitle in the sheets. As each dataset reported on has just one value of the dsname variable, this carries no information and I would like to remove it. Is there a parameter to proc report which could accomplish the job?&lt;/P&gt;&lt;P&gt;Alternatively, is there a way to dynamically name the sheets of ods excel other than using #byval? Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 11:22:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Hiding-by-variable-from-proc-report-output/m-p/581366#M23177</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2019-08-15T11:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding by variable from proc report output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Hiding-by-variable-from-proc-report-output/m-p/581367#M23178</link>
      <description>Have you tried OPTIONS NOBYLINE?&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Aug 2019 11:29:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Hiding-by-variable-from-proc-report-output/m-p/581367#M23178</guid>
      <dc:creator>jimhorne</dc:creator>
      <dc:date>2019-08-15T11:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding by variable from proc report output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Hiding-by-variable-from-proc-report-output/m-p/581368#M23179</link>
      <description>That is exactly what I needed, thanks!&lt;BR /&gt;Is there a less crude way of naming the sheets dynamically when using multiple proc report calls? Adding a fake variable containing the dataset name and using by with single value seems a bit crude.</description>
      <pubDate>Thu, 15 Aug 2019 11:38:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Hiding-by-variable-from-proc-report-output/m-p/581368#M23179</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2019-08-15T11:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding by variable from proc report output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Hiding-by-variable-from-proc-report-output/m-p/581746#M23188</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/223838"&gt;@js5&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;That is exactly what I needed, thanks!&lt;BR /&gt;Is there a less crude way of naming the sheets dynamically when using multiple proc report calls? Adding a fake variable containing the dataset name and using by with single value seems a bit crude.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It depends on what you mean by "dynamically". And to some extent the exact nature of your proc report calls.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your Proc Report code is not being generated dynamically then it may just be easier to add an&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods excel options(sheet_name="dataset");&lt;/P&gt;
&lt;P&gt;before each proc report changing the text of "dataset" as desired. I typically do this because SAS dataset names aren't necessarily "pretty". So I could use sheet_name="Child Age" instead of sheet_name="childage".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have some macro that generates the proc report code from a parameter list that includes a dataset name then you could dynamically add that ODS Excel option before the proc report code as part of the macro such as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%macro genericreport(libname=work,dsname=_last_);
ods excel options(sheet_name="&amp;amp;dsname.");
proc report data=&amp;amp;libname..&amp;amp;dsname.;
run;
%mend;


ods excel file="foo.xlsx" ;

%genericreport(dsname=foo);
%genericreport(dsname=bar);

ods excel close;&lt;/PRE&gt;
&lt;P&gt;If you have any more options to the Proc Report code though it would likely be easier just to add the separate ODS EXcel options as needed since you are already typing out the proc report. The extremely lazy could create very short macro to do just that line with the desired text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 15:22:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Hiding-by-variable-from-proc-report-output/m-p/581746#M23188</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-16T15:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding by variable from proc report output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Hiding-by-variable-from-proc-report-output/m-p/584502#M23226</link>
      <description>&lt;P&gt;Thanks, this did the trick! I did not know that you can call ods excel multiple times in addition to ods excel file... and ods excel close.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 11:17:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Hiding-by-variable-from-proc-report-output/m-p/584502#M23226</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2019-08-28T11:17:42Z</dc:date>
    </item>
  </channel>
</rss>

