<?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: Passing parameter to Footnote in macro in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Passing-parameter-to-Footnote-in-macro/m-p/363380#M5415</link>
    <description>&lt;P&gt;Thank you. I'll try without %nrstr.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Morten Fredrik&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jun 2017 12:03:31 GMT</pubDate>
    <dc:creator>AMUMOR_SAS</dc:creator>
    <dc:date>2017-06-01T12:03:31Z</dc:date>
    <item>
      <title>Passing parameter to Footnote in macro</title>
      <link>https://communities.sas.com/t5/Developers/Passing-parameter-to-Footnote-in-macro/m-p/363376#M5413</link>
      <description>&lt;P&gt;Hi. I am linking StPs, see the attachment which is just an example. When I output to HTML, link is working, but when I&amp;nbsp;output to XLSX, the link i not working.&amp;nbsp;However, if I copy the URL from XLSX to the addressfield in Internet Explorer, it works. What do I miss in the URL in XLSX?&lt;/P&gt;&lt;P&gt;To make i possible for the user to get an XLSX-output, I am trying to make a work around by placing the URL in a footnote, see the code below.. However, I am having trouble with passing parameters to the URL in the footnote. What am I doing wrong?&amp;nbsp;I have debugged and I am certain of that the variables have values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;.
.
.
/*  This code is for HTML output */

	%Else %Do;

		%STPBEGIN;

/* These variables have values */
		%Put 'Dato:' &amp;amp;Dato.;
		%put 'Levaar:' &amp;amp;Levaar.;
		%Put 'Kansv_Inp:' &amp;amp;Kansv_Inp.;
		%Put 'Valg:' &amp;amp;Valg.;

		ODS escapechar='^';

/* Title1 and Title2 gets values for &amp;amp;Levaar., &amp;amp;Dato. and &amp;amp;Kansv_Title. Why does it work for the Titles, but not for Footnote? */

		Title1 "^{style [font_size=14pt] ^{style [font_weight=Bold] ^{style [color=green] Vareleveranse for år &amp;amp;Levaar. pr. &amp;amp;Dato.}}}";
		Title2 "^{style [font_size=11pt] ^{style [font_weight=Bold] ^{style [color=black] Oversikt over varemottakere for &amp;amp;Kansv_Title}}}";

/* The variables in Footnote1 are not replaced by values, but they are passed as their name. Why? */

		Footnote1 link="%nrstr(do?_program=%2FLandkreditt+Bank+Informasjonsplattform%2FRapportering%2FAdministrasjon%2FStored+Process%2FUnder+arbeid%2FVareleveranse_StP_Print_Excel&amp;amp;Dato=&amp;amp;Dato.+&amp;amp;Levaar=&amp;amp;Levaar.+&amp;amp;Kundeansv=&amp;amp;Kundeansv+&amp;amp;valg=Excel)" "Open in Excel";

		Proc report data=work.Grunnlag_Overordnet_url nowd
				style (header)=[background=aliceblue];
				column Navn_Varemottaker Varemottaker Navn Leveranseaar Sum_Salgsverdi Sum_Omsetningsverdi Sum_Fratrekk;

/* Viktig: Kolonne Navn_Varemottaker benyttes aom input parameter til neste StP, men er ikke vist i rapport fordi den inneholder UTF-8-tegn */
			define Navn_Varemottaker /display Noprint;
			define Varemottaker /display;
/*			define Navn_Varemottaker /display;
			define Leveranseaar /display;*/

			compute Varemottaker;
				/*urlstring='https://www.google.no/?q='!!strip(varemottaker)!!trim(left(Navn));*/

/* This is the URL which is working in HTML, but not in XLSX. However, if I copy the URL from XLSX to the addressfield i Internet Explorer, it works.  */

urlstring = 'http://fdpsas001test.landkreditt.local/SASStoredProcess/do?_action=form%2Cproperties%2Cexecute%2Cnobanner%2Cnewwindow&amp;amp;_program=%2FLandkreditt+Bank+Informasjonsplattform%2FRapportering%2FAdministrasjon%2FStored+Process%2FUnder+arbeid%2FVareleveranse_StP_Print_Kansv&amp;amp;Dato='!!"&amp;amp;Dato."!!'+&amp;amp;Levaar='!!"&amp;amp;Levaar."!!'+&amp;amp;Aar_Ifj='!!"&amp;amp;Aar_Ifj."!!'+&amp;amp;Fra_Aar='!!"&amp;amp;Aar_Fra."!!'+&amp;amp;Navn_Mottaker='!!strip(Navn_Varemottaker)!!'+&amp;amp;Mottaker='!!strip(varemottaker)!!'+&amp;amp;Kundeansv='!!&amp;amp;Kansv_Inp!!'+&amp;amp;valg='!!"&amp;amp;Valg.";

call define ('varemottaker','URL',urlstring);

endcomp;

		Run;

		%STPEND;
	%End;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Morten Fredrik&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 11:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Passing-parameter-to-Footnote-in-macro/m-p/363376#M5413</guid>
      <dc:creator>AMUMOR_SAS</dc:creator>
      <dc:date>2017-06-01T11:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Passing parameter to Footnote in macro</title>
      <link>https://communities.sas.com/t5/Developers/Passing-parameter-to-Footnote-in-macro/m-p/363378#M5414</link>
      <description>&lt;P&gt;%nrstr is&amp;nbsp; a macro function for masking special characters and therefore prevents resolution of macro variables and macro calls.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 12:00:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Passing-parameter-to-Footnote-in-macro/m-p/363378#M5414</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-06-01T12:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: Passing parameter to Footnote in macro</title>
      <link>https://communities.sas.com/t5/Developers/Passing-parameter-to-Footnote-in-macro/m-p/363380#M5415</link>
      <description>&lt;P&gt;Thank you. I'll try without %nrstr.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Morten Fredrik&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 12:03:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Passing-parameter-to-Footnote-in-macro/m-p/363380#M5415</guid>
      <dc:creator>AMUMOR_SAS</dc:creator>
      <dc:date>2017-06-01T12:03:31Z</dc:date>
    </item>
  </channel>
</rss>

