<?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: STP in WRS create link with browser language in SAS Web Report Studio</title>
    <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40347#M741</link>
    <description>data _null_; &lt;BR /&gt;
  format infile $char256.; &lt;BR /&gt;
  input;&lt;BR /&gt;
  infile = resolve(_infile_);&lt;BR /&gt;
  file _webout;&lt;BR /&gt;
  put infile;&lt;BR /&gt;
cards4;&lt;BR /&gt;
 &lt;BR /&gt;
 &lt;BR /&gt;
 &lt;BR /&gt;
&lt;SCRIPT type="text/javascript"&gt; 	 	  	&amp;lt;br&amp;gt;
&amp;lt;!--					 &amp;lt;br&amp;gt;
function GoTolink()	 &amp;lt;br&amp;gt;
{						 &amp;lt;br&amp;gt;
var userLang = (navigator.language) ? navigator.language : navigator.userLanguage;  &amp;lt;br&amp;gt;
document.location.href = "www.somesite.com/search/"+userLang;		  &amp;lt;br&amp;gt;
}						 &amp;lt;br&amp;gt;
//--&amp;gt; 					 							&amp;lt;br&amp;gt;
&lt;/SCRIPT&gt;					 	&lt;BR /&gt;
					 &lt;BR /&gt;
&lt;A&gt;myLink&lt;/A&gt;	 	&lt;BR /&gt;
						 &lt;BR /&gt;
	&lt;BR /&gt;
;;;;&lt;BR /&gt;
run;</description>
    <pubDate>Wed, 30 Mar 2011 14:45:28 GMT</pubDate>
    <dc:creator>metalray</dc:creator>
    <dc:date>2011-03-30T14:45:28Z</dc:date>
    <item>
      <title>STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40339#M733</link>
      <description>Hi Guys,&lt;BR /&gt;
&lt;BR /&gt;
we have an internal website that we want to link to in our web reports but&lt;BR /&gt;
the requirement is to add a SAS web report or browser language of the user to that link.&lt;BR /&gt;
right now the STP is very simple and I wonder if there is a variable (global, session?)&lt;BR /&gt;
that would tell us which language the user is using to look at sas web report studio or&lt;BR /&gt;
finaly info delivery portal.&lt;BR /&gt;
&lt;BR /&gt;
 data _null_;&lt;BR /&gt;
 file _webout;&lt;BR /&gt;
 put '';&lt;BR /&gt;
 put 'Link to language specific product details';&lt;BR /&gt;
 put '';&lt;BR /&gt;
 run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Bob</description>
      <pubDate>Tue, 29 Mar 2011 17:50:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40339#M733</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-03-29T17:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40340#M734</link>
      <description>Bob,&lt;BR /&gt;
You will need to include some javascript in your stored process to retrieve the browser language. A quick search via google found this:&lt;BR /&gt;
&lt;BR /&gt;
var userLang = (navigator.language) ? navigator.language : navigator.userLanguage; &lt;BR /&gt;
alert ("The language is: " + userLang);&lt;BR /&gt;
&lt;BR /&gt;
(retrieved from: &lt;A href="http://answers.yahoo.com/question/index?qid=20080418104516AAssAjm)" target="_blank"&gt;http://answers.yahoo.com/question/index?qid=20080418104516AAssAjm)&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
~ Angela</description>
      <pubDate>Tue, 29 Mar 2011 18:30:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40340#M734</guid>
      <dc:creator>AngelaHall</dc:creator>
      <dc:date>2011-03-29T18:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40341#M735</link>
      <description>Hello Angela,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the hint. I did not think about Java script.&lt;BR /&gt;
The following works now in EG 4.2 if I click on the stored&lt;BR /&gt;
process to modify it and in the "SAS Code" section undo the "Include Code for"..."Stored Process macros".&lt;BR /&gt;
&lt;BR /&gt;
If I leave it it the following error comes:&lt;BR /&gt;
"ERROR: File is in use, _WEBOUT "&lt;BR /&gt;
&lt;BR /&gt;
In the web report studio the same code gives me the error &lt;BR /&gt;
"The specified stored process does not produce package results. Only stored processes producing package results can be processed."!&lt;BR /&gt;
&lt;BR /&gt;
The execution is set to streaming and if I change it to package a new error comes:&lt;BR /&gt;
ERROR: Insufficient authorization to access /project/sas92config/dev/config/Lev1/SASApp/_webout.dat.&lt;BR /&gt;
&lt;BR /&gt;
I am sorry for the bad display of the following code but the forum software has some difficulties with it.</description>
      <pubDate>Wed, 30 Mar 2011 11:53:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40341#M735</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-03-30T11:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40342#M736</link>
      <description>&lt;I&gt;data _null_;&lt;BR /&gt;
file _webout; &lt;BR /&gt;
put ' ';&lt;BR /&gt;
put ' ';&lt;BR /&gt;
put ' ';&lt;BR /&gt;
put '&lt;SCRIPT type="text/javascript"&gt; 	 '; 	&amp;lt;br&amp;gt;
put '&amp;lt;!--			 ';&amp;lt;br&amp;gt;
put 'function GoTolink() ';&amp;lt;br&amp;gt;
put '{			 ';&amp;lt;br&amp;gt;
put 'var userLang = (navigator.language) ? navigator.language : navigator.userLanguage;  ';&amp;lt;br&amp;gt;
put 'document.location.href = "www.somesite.com/search/"+userLang;				 ';&amp;lt;br&amp;gt;
put '}			 ';&amp;lt;br&amp;gt;
put '//--&amp;gt; 			';							&amp;lt;br&amp;gt;
put '&lt;/SCRIPT&gt;			';	&lt;BR /&gt;
put '		 ';&lt;BR /&gt;
put '&lt;A&gt;myLink&lt;/A&gt; ';	&lt;BR /&gt;
put '		 ';&lt;BR /&gt;
put '	';&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;/I&gt;</description>
      <pubDate>Wed, 30 Mar 2011 11:56:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40342#M736</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-03-30T11:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40343#M737</link>
      <description>The %stpbegin and %stpend macros can lock the webout location from further updates. Here is my blog post on how to write code out to the stored process streaming location.&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://sas-bi.blogspot.com/2010/07/combining-graphsprocs-with-custom-html.html" target="_blank"&gt;http://sas-bi.blogspot.com/2010/07/combining-graphsprocs-with-custom-html.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Also - here is a sample from SAS on putting out HTML code without worrying about all the ' and " values:&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/37/050.html" target="_blank"&gt;http://support.sas.com/kb/37/050.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
~ Angela</description>
      <pubDate>Wed, 30 Mar 2011 13:29:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40343#M737</guid>
      <dc:creator>AngelaHall</dc:creator>
      <dc:date>2011-03-30T13:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40344#M738</link>
      <description>Hello Angela,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your input.&lt;BR /&gt;
while waiting for a reply I changed the execution to the workspace server and the output to package&lt;BR /&gt;
to follow the fix mentioned here &lt;A href="http://support.sas.com/kb/33/846.html" target="_blank"&gt;http://support.sas.com/kb/33/846.html&lt;/A&gt; in EG 4.2 the STP &lt;BR /&gt;
executed without problems but in WRS it still showed : "The specified stored process does not produce package results. Only stored processes producing package results can be processed."!&lt;BR /&gt;
&lt;BR /&gt;
I changed it back to the stored process server with streaming output and used your example,&lt;BR /&gt;
pasting in my own code. The STP runs but there is an empty result html . Using stpbegin or not does not change it and&lt;BR /&gt;
opening it in WRS still tells me that there is no package result (leading me to &lt;A href="http://support.sas.com/kb/33/846.html" target="_blank"&gt;http://support.sas.com/kb/33/846.html&lt;/A&gt; again).&lt;BR /&gt;
&lt;BR /&gt;
Now, using the other example you posted, it actually gives a result in EG 4.2 but saving it again as a STP&lt;BR /&gt;
and placing it in my web report gives the error ""The specified stored process does not produce package results. Only stored processes producing package results can be processed."!",&lt;BR /&gt;
leading me again to &lt;A href="http://support.sas.com/kb/33/846.html" target="_blank"&gt;http://support.sas.com/kb/33/846.html&lt;/A&gt;.&lt;BR /&gt;
If I select packaging as execution option I am at error "ERROR: Insufficient authorization to access /project/sas92config/dev/config/Lev1/SASApp/_webout.dat." then &lt;A href="http://support.sas.com/kb/17/316.html" target="_blank"&gt;http://support.sas.com/kb/17/316.html&lt;/A&gt; tells me I should set it to "streaming". &lt;BR /&gt;
&lt;BR /&gt;
It seems I am running around in circles.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ods html body=_webout (no_bottom_matter) path=&amp;amp;_tmpcat  (url=&amp;amp;_replay);&lt;BR /&gt;
&lt;BR /&gt;
/* This is where SAS Procs can go to produce output to the website*/&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
 put ' ';&lt;BR /&gt;
 put ' ';&lt;BR /&gt;
 put ' ';&lt;BR /&gt;
 put '&lt;SCRIPT type="text/javascript"&gt; 	 	 '; 	&amp;lt;br&amp;gt;
 put '&amp;lt;!--					 ';&amp;lt;br&amp;gt;
 put 'function GoTolink()	 ';&amp;lt;br&amp;gt;
 put '{						 ';&amp;lt;br&amp;gt;
 put 'var userLang = (navigator.language) ? navigator.language : navigator.userLanguage;  ';&amp;lt;br&amp;gt;
 put 'document.location.href = "www.somesite.com/search/"+userLang;		  ';&amp;lt;br&amp;gt;
 put '}						 ';&amp;lt;br&amp;gt;
 put '//--&amp;gt; 					 ';							&amp;lt;br&amp;gt;
 put '&lt;/SCRIPT&gt;					 ';	&lt;BR /&gt;
 put '					 ';&lt;BR /&gt;
 put '&lt;A&gt;myLink&lt;/A&gt;	 ';	&lt;BR /&gt;
 put '						 ';&lt;BR /&gt;
 put '						 ';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/*Close the _webout location to allow the data _null_ step to write to it*/&lt;BR /&gt;
ods html close;&lt;BR /&gt;
&lt;BR /&gt;
/*This is where Data Null HTML Code can go*/&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  file _webout;&lt;BR /&gt;
  put '';&lt;BR /&gt;
  put '';&lt;BR /&gt;
/** INSERT OTHER HTML CODE HERE **/&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/*Reopen the _webout location for SAS Procs to write to.*/ods html body=_webout (no_top_matter) path=&amp;amp;_tmpcat (url=&amp;amp;_replay);&lt;BR /&gt;
&lt;BR /&gt;
/* This is where SAS Procs can go to produce output to the website*/&lt;BR /&gt;
&lt;BR /&gt;
proc gchart data=sashelp.shoes;&lt;BR /&gt;
   vbar region/sumvar=sales;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
/*Closes the web output location.*/&lt;BR /&gt;
ods html close; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Bob&lt;BR /&gt;
&lt;BR /&gt;
PS: Dear Forum Admin, I just noticed that the html code in this post actually generated a link. I dont think its great that this happens when posting code examples</description>
      <pubDate>Wed, 30 Mar 2011 14:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40344#M738</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-03-30T14:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40345#M739</link>
      <description>Bob,&lt;BR /&gt;
Do you have the STP registered to a workspace server? To have the stored process generate streaming results, it needs to be registered to the stored process server.&lt;BR /&gt;
&lt;BR /&gt;
Also - I would move the line:&lt;BR /&gt;
file _webout;&lt;BR /&gt;
&lt;BR /&gt;
To be immediately below the first data _null_ statement.&lt;BR /&gt;
&lt;BR /&gt;
~ Angela</description>
      <pubDate>Wed, 30 Mar 2011 14:38:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40345#M739</guid>
      <dc:creator>AngelaHall</dc:creator>
      <dc:date>2011-03-30T14:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40346#M740</link>
      <description>Hi Angela.&lt;BR /&gt;
&lt;BR /&gt;
I dont even now if I should use streaming or package result. it always tells me in WRS&lt;BR /&gt;
"The specified stored process does not produce package results. Only stored processes producing package results can be processed."!",&lt;BR /&gt;
That reads like it should be a package result.&lt;BR /&gt;
&lt;BR /&gt;
What do you mean by "registered" I selected the stored process server as execution server is that not enough?&lt;BR /&gt;
&lt;BR /&gt;
I use the code from one of the examples you sent, it shows fine in EG 4.2 but not in WRS (see "The specified stored...).</description>
      <pubDate>Wed, 30 Mar 2011 14:44:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40346#M740</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-03-30T14:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40347#M741</link>
      <description>data _null_; &lt;BR /&gt;
  format infile $char256.; &lt;BR /&gt;
  input;&lt;BR /&gt;
  infile = resolve(_infile_);&lt;BR /&gt;
  file _webout;&lt;BR /&gt;
  put infile;&lt;BR /&gt;
cards4;&lt;BR /&gt;
 &lt;BR /&gt;
 &lt;BR /&gt;
 &lt;BR /&gt;
&lt;SCRIPT type="text/javascript"&gt; 	 	  	&amp;lt;br&amp;gt;
&amp;lt;!--					 &amp;lt;br&amp;gt;
function GoTolink()	 &amp;lt;br&amp;gt;
{						 &amp;lt;br&amp;gt;
var userLang = (navigator.language) ? navigator.language : navigator.userLanguage;  &amp;lt;br&amp;gt;
document.location.href = "www.somesite.com/search/"+userLang;		  &amp;lt;br&amp;gt;
}						 &amp;lt;br&amp;gt;
//--&amp;gt; 					 							&amp;lt;br&amp;gt;
&lt;/SCRIPT&gt;					 	&lt;BR /&gt;
					 &lt;BR /&gt;
&lt;A&gt;myLink&lt;/A&gt;	 	&lt;BR /&gt;
						 &lt;BR /&gt;
	&lt;BR /&gt;
;;;;&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 30 Mar 2011 14:45:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40347#M741</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-03-30T14:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40348#M742</link>
      <description>Hello Angela,&lt;BR /&gt;
I looked at your examples again but struggle to get any STP displayed on my web report.&lt;BR /&gt;
The error is the following:&lt;BR /&gt;
&lt;BR /&gt;
"The specified stored process does not produce package results. &lt;BR /&gt;
Only stored processes producing package results can be processed."!&lt;BR /&gt;
&lt;BR /&gt;
I have the Logical Stored Process server and streaming output selected and wonder if&lt;BR /&gt;
it has to do with this:&lt;BR /&gt;
&lt;BR /&gt;
SAS Web Report Studio does not support "Streaming" output.&lt;BR /&gt;
So, your stored process cannot write to the "_webout"&lt;BR /&gt;
fileref.&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/19/597.html" target="_blank"&gt;http://support.sas.com/kb/19/597.html&lt;/A&gt;</description>
      <pubDate>Thu, 28 Apr 2011 08:52:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40348#M742</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-04-28T08:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40349#M743</link>
      <description>It seems that web report studio can not deal with _webout. Which is a big problem when one wants to generate dynamic html.</description>
      <pubDate>Tue, 03 May 2011 09:00:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40349#M743</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-05-03T09:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40350#M744</link>
      <description>In my experience, folks who are using custom HTML either use the SAS Information Delivery Portal or the SAS Stored Process Web Application or they integrate the calls to run Stored Processes into their own web sites ...using JSPs or URL calls to the Stored Process Web Application.&lt;BR /&gt;
 &lt;BR /&gt;
While SAS Web Report Studio runs -inside- a browser, it is a reporting -application-, built on Java technology, not built on HTML technology. The SAS Web Report Studio maintains state and does not work using the HTTP protocol.&lt;BR /&gt;
&lt;BR /&gt;
The HTTP protocol primarily uses a request/response model in which a client browser makes a URL-request and the receiving server satisfies the request and sends HTML results (usually) back to the client browser. Once this transaction is finished, the server is out of the picture and a new request from the client is a new request.&lt;BR /&gt;
&lt;BR /&gt;
When you log onto SAS Web Report studio, the browser is merely a container to hold and display the WRS application screens. The servers that you use and the requests that you make and the reports that you build are all handled within your logon session to WRS. &lt;BR /&gt;
 &lt;BR /&gt;
Generally speaking the _WEBOUT file reference is used with HTTP-based or HTML-based client applications like the Portal and the Stored Process Web Application, or with custom front ends, such as you might code yourself using .NET or Java technology.&lt;BR /&gt;
 &lt;BR /&gt;
Depending on what you want/need to do, it might not be appropriate to use _WEBOUT with Web Report Studio reports. You might want to check with SAS Technical Support or, look at some of the SPWA sample programs -- there are many examples of drilling down and creating linked output and using _WEBOUT with the SPWA.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 03 May 2011 23:01:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40350#M744</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-05-03T23:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40351#M745</link>
      <description>Hi Cynthia,&lt;BR /&gt;
Thanks for the detailed reply.&lt;BR /&gt;
Below is the most recent version of the code. It is displayed without errors but&lt;BR /&gt;
the HTML is not rendered as HTML either, the code is displayed:&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
*ProcessBody;&lt;BR /&gt;
  %STPBEGIN;&lt;BR /&gt;
&lt;BR /&gt;
%let libWORK=%sysfunc(pathname(WORK)); * work lib is on UNIX ; &lt;BR /&gt;
ods html body="&amp;amp;libWORK./MYFILE.htm" ;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
 file print;&lt;BR /&gt;
 put '' / &lt;BR /&gt;
        '       '/ &lt;BR /&gt;
        '               &lt;TITLE&gt; A Title &lt;/TITLE&gt;'/ &lt;BR /&gt;
        '  some content  '; &lt;BR /&gt;
run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
&lt;BR /&gt;
data _null_; &lt;BR /&gt;
    file "&amp;amp;libWORK./MYFILE.htm"; &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
 %STPEND;&lt;BR /&gt;
&lt;BR /&gt;
If the code is rendered as HTML I would need to extend it with java script to fetch the browser language and build a link.&lt;BR /&gt;
&lt;BR /&gt;
I am avoiding the webout problem by writing into the WORK library of the specific user so they dont overwrite&lt;BR /&gt;
each others html output (and html output cant be avoided since _webout is not applicable)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
SPWA Problems: The STP is executed somewhere else, I wont get the URL of the report (report name), another login is required&lt;BR /&gt;
SAS Delivery Portal Problem: The link is web report based/dependant, so it has to be put on each report using WRS&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Bob</description>
      <pubDate>Fri, 06 May 2011 14:28:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40351#M745</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-05-06T14:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40352#M746</link>
      <description>Hi,&lt;BR /&gt;
I really think that you should work with Tech Support on this. Just seeing your code is not even 1/4th of the necessary information. You need to supply stored process execution options, server used,parameters, client info, URL that is used to execute the SP, screen shots of what you see would be useful (for example, I don't know what you mean by "the code is displayed".)&lt;BR /&gt;
&lt;BR /&gt;
Tech support can open a track, clarify this info and work with you to a resolution.&lt;BR /&gt;
&lt;BR /&gt;
Cynthia</description>
      <pubDate>Fri, 06 May 2011 15:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40352#M746</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-05-06T15:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: STP in WRS create link with browser language</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40353#M747</link>
      <description>Hello Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your input. I have been through this topic with Tech Support but there was no solution apart from refering me to use Stored Process Web Applications (which does not help).&lt;BR /&gt;
&lt;BR /&gt;
Let me try to give you the missing 3/4 of the information:&lt;BR /&gt;
STP Execution Server: Logical Stored Process Server, also tried with Workspace Server&lt;BR /&gt;
STP Execution Options: Package, since WRS can not deal with Streaming output (http://support.sas.com/kb/19/597.html )&lt;BR /&gt;
URL used to execute STP: None it should be placed within a web report, just like we can do it with other STPs&lt;BR /&gt;
Screen shot: As far as I know the SAS forum software does not allow screen prints to be added&lt;BR /&gt;
&lt;BR /&gt;
When I say "The code is displayed". I mean that the code not rendered as HTML but as Text and is displayed as text.&lt;BR /&gt;
&lt;BR /&gt;
STP (inserted into Web Report) Code:&lt;BR /&gt;
---------------------------------------&lt;BR /&gt;
*ProcessBody;&lt;BR /&gt;
  %STPBEGIN;&lt;BR /&gt;
&lt;BR /&gt;
%let libWORK=%sysfunc(pathname(WORK)); * work lib is on UNIX ; &lt;BR /&gt;
ods html body="&amp;amp;libWORK./MYFILE.htm" ;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
 file print;&lt;BR /&gt;
put ''/&lt;BR /&gt;
''/&lt;BR /&gt;
''/&lt;BR /&gt;
'&lt;SCRIPT type="text/javascript"&gt; 	'/ 	&amp;lt;br&amp;gt;
'&amp;lt;!--'/&amp;lt;br&amp;gt;
'function GoTolink()'/&amp;lt;br&amp;gt;
'{'/&amp;lt;br&amp;gt;
'var userLang = (navigator.language) ? navigator.language : navigator.userLanguage;'/&amp;lt;br&amp;gt;
'var fullurl = document.location.href;'/&amp;lt;br&amp;gt;
'var reportname =  fullurl.substring(fullurl.length -10);'/&amp;lt;br&amp;gt;
'document.location.href = "www.somesite.com/search/"+"_"+reportname+"_"+userLang;'/&amp;lt;br&amp;gt;
'}'/&amp;lt;br&amp;gt;
'//--&amp;gt; 		'/					&amp;lt;br&amp;gt;
'&lt;/SCRIPT&gt;	'/	&lt;BR /&gt;
''/&lt;BR /&gt;
'&lt;A&gt;myLink&lt;/A&gt;	'/&lt;BR /&gt;
'	'/&lt;BR /&gt;
'	';&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
&lt;BR /&gt;
data _null_; &lt;BR /&gt;
    file "&amp;amp;libWORK./MYFILE.htm"; &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
 %STPEND;&lt;BR /&gt;
&lt;BR /&gt;
---------------------------------------&lt;BR /&gt;
I hope that helps.&lt;BR /&gt;
I noticed that WRS wraps the code in a &lt;PRE&gt; tag, which explains which my HTML/JS is not properly renderd.&lt;BR /&gt;
&lt;BR /&gt;
&lt;PRE&gt;&amp;lt;html&amp;gt;                                         &lt;BR /&gt;       &amp;lt;head&amp;gt;                                              &lt;BR /&gt;               &amp;lt;title&amp;gt; A Title &amp;lt;/title&amp;gt;                                            &lt;BR /&gt;&amp;lt;/head&amp;gt; &amp;lt;body&amp;gt; &amp;lt;a href="www.google.com"&amp;gt;some content&amp;lt;/a&amp;gt; &amp;lt;/body&amp;gt; &amp;lt;/html&amp;gt;                                             &lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Bob&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 May 2011 07:34:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/STP-in-WRS-create-link-with-browser-language/m-p/40353#M747</guid>
      <dc:creator>metalray</dc:creator>
      <dc:date>2011-05-09T07:34:50Z</dc:date>
    </item>
  </channel>
</rss>

