<?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: ODS to HTML with buttons for PDF and Excel without Requerying data in Developers</title>
    <link>https://communities.sas.com/t5/Developers/ODS-to-HTML-with-buttons-for-PDF-and-Excel-without-Requerying/m-p/293746#M5097</link>
    <description>&lt;P&gt;The session is unique to each user. &amp;nbsp;If you don't use sessions and instead store files in some other location accessible to the browser, then you need to consider cleanup and access issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See also _OUTPUTAPP and _CONTDISP:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using the REPLAY Program&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/dispatch/64895/HTML/default/viewer.htm#replay.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/dispatch/64895/HTML/default/viewer.htm#replay.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using reserved Macro Variables&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/stpug/68399/HTML/default/viewer.htm#p184mqqbi9w6qjn1q0619x19eg02.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/stpug/68399/HTML/default/viewer.htm#p184mqqbi9w6qjn1q0619x19eg02.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Aug 2016 14:52:48 GMT</pubDate>
    <dc:creator>Vince_SAS</dc:creator>
    <dc:date>2016-08-24T14:52:48Z</dc:date>
    <item>
      <title>ODS to HTML with buttons for PDF and Excel without Requerying data</title>
      <link>https://communities.sas.com/t5/Developers/ODS-to-HTML-with-buttons-for-PDF-and-Excel-without-Requerying/m-p/293452#M5094</link>
      <description>&lt;P&gt;I have a table I created from a stored process that outputs to html via ods. Attached to the html are two buttons (one for downloading the table as pdf and the other excel).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for a way to query the data once and somehow save the pdf/excel output until the user clicks the pdf/excel button. My current solution is to query the data twice - once on page load to show the HTML table and again in a separate stored process when the user clicks the pdf/excel button.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I want to generate the pdf and excel downloadable documents on initial page load but don't give them to the user until button click.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is some pseudo code using some jquery.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sql;
    some query
quit;

ods html body=_webout;

ods html text="&lt;BR /&gt;     &amp;lt;script&amp;gt;
       $('#printPDF').click(function(){
         Requery data in a separate stored process
	});

       $('#printExcel').click(function(){
         Requery data in a separate stored process
         });
     &amp;lt;/script&amp;gt;

     &amp;lt;button id='printPDF'&amp;gt;Print PDF&amp;lt;/button&amp;gt;
     &amp;lt;button id='printExcel'&amp;gt;Print Excel&amp;lt;/button&amp;gt;";

/* output html table */
proc report 
	data=mydata;
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Aug 2016 14:38:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/ODS-to-HTML-with-buttons-for-PDF-and-Excel-without-Requerying/m-p/293452#M5094</guid>
      <dc:creator>TedP</dc:creator>
      <dc:date>2016-08-23T14:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: ODS to HTML with buttons for PDF and Excel without Requerying data</title>
      <link>https://communities.sas.com/t5/Developers/ODS-to-HTML-with-buttons-for-PDF-and-Excel-without-Requerying/m-p/293686#M5095</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an old document that may be helpful:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample 26165: Generating Multiple Output Types at Once Using SAS/IntrNet&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/techsup/notes/v8/26/165.html" target="_blank"&gt;http://support.sas.com/techsup/notes/v8/26/165.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It was written for SAS/IntrNet but you should be able to adapt it for use with a stored process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Vince DelGobbo&lt;/P&gt;
&lt;P&gt;SAS R&amp;amp;D&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 12:24:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/ODS-to-HTML-with-buttons-for-PDF-and-Excel-without-Requerying/m-p/293686#M5095</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2016-08-24T12:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: ODS to HTML with buttons for PDF and Excel without Requerying data</title>
      <link>https://communities.sas.com/t5/Developers/ODS-to-HTML-with-buttons-for-PDF-and-Excel-without-Requerying/m-p/293735#M5096</link>
      <description>&lt;P&gt;Thanks Vince. That example mirrors very closely to what I want to do. I wonder how this works when multiple users are accessing the stored process at the same time. Will this&amp;nbsp;'lightweight' session be unique to each user?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I might just do this all on the front end without SAS using some javascript libraries.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 14:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/ODS-to-HTML-with-buttons-for-PDF-and-Excel-without-Requerying/m-p/293735#M5096</guid>
      <dc:creator>TedP</dc:creator>
      <dc:date>2016-08-24T14:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: ODS to HTML with buttons for PDF and Excel without Requerying data</title>
      <link>https://communities.sas.com/t5/Developers/ODS-to-HTML-with-buttons-for-PDF-and-Excel-without-Requerying/m-p/293746#M5097</link>
      <description>&lt;P&gt;The session is unique to each user. &amp;nbsp;If you don't use sessions and instead store files in some other location accessible to the browser, then you need to consider cleanup and access issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See also _OUTPUTAPP and _CONTDISP:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using the REPLAY Program&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/dispatch/64895/HTML/default/viewer.htm#replay.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/dispatch/64895/HTML/default/viewer.htm#replay.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using reserved Macro Variables&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/stpug/68399/HTML/default/viewer.htm#p184mqqbi9w6qjn1q0619x19eg02.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/stpug/68399/HTML/default/viewer.htm#p184mqqbi9w6qjn1q0619x19eg02.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 14:52:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/ODS-to-HTML-with-buttons-for-PDF-and-Excel-without-Requerying/m-p/293746#M5097</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2016-08-24T14:52:48Z</dc:date>
    </item>
  </channel>
</rss>

