<?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: Export each page of my report to custom named html file (Combination of static text and variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Export-each-page-of-my-report-to-custom-named-html-file/m-p/672212#M201986</link>
    <description>Unfortunately not at this point. One option is to add a rename step to the file, but you need to do it after you have the ODS CLOSE statement so the file is created and finalized. &lt;BR /&gt;&lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p14axci3mo3egan1okbcydvbt433.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p14axci3mo3egan1okbcydvbt433.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Another option, one I usually use, is to use a macro instead and explicitly control the output name. &lt;BR /&gt;&lt;A href="https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md" target="_blank"&gt;https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md&lt;/A&gt;</description>
    <pubDate>Fri, 24 Jul 2020 21:27:01 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-07-24T21:27:01Z</dc:date>
    <item>
      <title>Export each page of my report to custom named html file (Combination of static text and variable)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-each-page-of-my-report-to-custom-named-html-file/m-p/672167#M201970</link>
      <description>Hello,&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;i have the following code for writing a report to HTML:&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;"&lt;BR /&gt;ods html file='C:\analysis1.html'&lt;BR /&gt;newfile=page;&lt;BR /&gt;proc report data=sales nowd list headline headskip spacing=2 split='~';&lt;BR /&gt;by branchid;&lt;BR /&gt;column (branchid representative sales);&lt;BR /&gt;define branchid / group noprint;&lt;BR /&gt;define representative / display 'Representative Name';&lt;BR /&gt;define Sales / display f=comma20. 'Yearly Sales';&lt;BR /&gt;run;&lt;BR /&gt;ods html close;&lt;BR /&gt;"&lt;BR /&gt;This creates for each change of branch ID in the report an incremental file e.g.:&lt;BR /&gt;analysis1.html&lt;BR /&gt;analysis2.html&lt;BR /&gt;analysis3.html&lt;BR /&gt;...&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Is there any way to change the name of the output html file for each page dynamically? i would like to have a combination of 'analysis1' || trim(branchid) ||'.html' variable, resulting in&lt;BR /&gt;analysis1HK.html&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;(Hong Kong Branch)&lt;BR /&gt;analysis1LO.html&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;(London Branch)&lt;BR /&gt;....&lt;BR /&gt;and so on for all branchid defined in the report.&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Is this possible somehow ?&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Thank you very much,</description>
      <pubDate>Fri, 24 Jul 2020 20:22:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-each-page-of-my-report-to-custom-named-html-file/m-p/672167#M201970</guid>
      <dc:creator>VCucu</dc:creator>
      <dc:date>2020-07-24T20:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Export each page of my report to custom named html file (Combination of static text and variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-each-page-of-my-report-to-custom-named-html-file/m-p/672212#M201986</link>
      <description>Unfortunately not at this point. One option is to add a rename step to the file, but you need to do it after you have the ODS CLOSE statement so the file is created and finalized. &lt;BR /&gt;&lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p14axci3mo3egan1okbcydvbt433.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p14axci3mo3egan1okbcydvbt433.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Another option, one I usually use, is to use a macro instead and explicitly control the output name. &lt;BR /&gt;&lt;A href="https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md" target="_blank"&gt;https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md&lt;/A&gt;</description>
      <pubDate>Fri, 24 Jul 2020 21:27:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-each-page-of-my-report-to-custom-named-html-file/m-p/672212#M201986</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-24T21:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Export each page of my report to custom named html file (Combination of static text and variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-each-page-of-my-report-to-custom-named-html-file/m-p/672324#M202043</link>
      <description>super. thank you very much for the feedback. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; i will try the macro variant.</description>
      <pubDate>Sat, 25 Jul 2020 15:00:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-each-page-of-my-report-to-custom-named-html-file/m-p/672324#M202043</guid>
      <dc:creator>VCucu</dc:creator>
      <dc:date>2020-07-25T15:00:08Z</dc:date>
    </item>
  </channel>
</rss>

