BookmarkSubscribeRSS Feed
Jaime
Fluorite | Level 6
Hi,
I have a proc report with embedded links to another report. I use the script below to generate the linked column. It does not seem to be working when I create the stored a stored proc report in Web Report Studio.
I thought WRS 4.2 finally supported embedded links.




proc report data=Survey_Report(where=(question not in (11,8,12,13,14,15) and ReasonForCall='Screener'));
column SurveyDate AverageScore, Question;
define SurveyDate/group;
define Question/across order=data;
define AverageScore/analysis mean '' style(column=background=score.};

compute SurveyDate;
urlstring='http://www.google.com';
call define(_col_, 'URL', urlstring);
endcomp;
run;
9 REPLIES 9
Cynthia_sas
SAS Super FREQ
Hi:
Going to http://www.google.com -might- work in the Information Delivery Portal, but I'm not sure it will work in Web Report Studio. WRS runs in a web browser using Java technology. I'm not sure you can exit completely from WRS to go to a different web site from within the WRS application. An example from the 9.2 developer's documentation:
http://support.sas.com/documentation/cdl/en/stpug/61271/HTML/default/webinput.htm

A sample URL would be:
http://yourserver/SASStoredProcess/do?_program=/WebApps/Sales/Weekly+Report&region=West

which would execute a stored process with a REGION parameter value of West.

cynthia
Madelyn_SAS
SAS Super FREQ
When you say "it is not working", can you explain exactly what results you are seeing in Web Report Studio?
AngelaHall
SAS Employee
Jamie,
Instead of proc report, you could use data _null_ statements to custom define the URL as <a href="http://www.google.com" target=new>test</a>
This would force the url to open in a new window - outside of the Web Report Studio app.

There are lots of examples in SGF/SUGI papers online. Here is the first one I found when searching on "sas data _null_ html output" in Google:
http://www2.sas.com/proceedings/sugi27/p061-27.pdf

~ Angela Hall
http://sas-bi.blogspot.com
Jaime
Fluorite | Level 6
Hi all and thanks for responding,

The problem is WRS wont display the hyperlink. I ran the report out to an html file and I see the links that I can click on.
In WRS studio, however, only report comes out with no hyperlinks.

Is this code correct?
compute SurveyDate;
urlstring='http://www.google.com';
call define(_col_, 'URL', urlstring);
endcomp;
run;
Jaime
Fluorite | Level 6
FYI. It does work when I run it in Information delivery Portal.
WRS, however, removed the link.
Cynthia_sas
SAS Super FREQ
Hi:
Angela's example shows explicitly coding target="new"
[pre]
<a href="http://www.google.com" target=new>test</a>
[/pre]

Otherwise, the default URL/HREF that PROC REPORT builds is:
[pre]
<a href="http://www.google.com">test</a>
[/pre]

I believe the default TARGET behavior is the browser setting, which is, I think to reuse the same window -- and probably WRS is not happy about that -- the Portal doesn't care -- it allows you to use browser windows as you want.

As far as I know, the only way to get TARGET= into the URL created with ODS is to change the STYLE template attribute HREFTARGET. However, the downside of this is that WRS -generally- does not use any style template that you specify. So, for example, if you specified this in a stored process:
[pre]
%let _ODSSTYLE=sasweb;
*ProcessBody;
%stpbegin;
...rest of code;
%stpend;
[/pre]

Many of the Enterprise Intelligence Platform client applications (like the Portal or EG) would use the SASWEB style template to apply style when the output was rendered. However, WRS does -not- use the SAS style template specified in _ODSSTYLE -- it uses the styles as defined in the XML behind the scenes with WRS -- since the any output type that you specify is SASReport XML by the time the report gets to WRS. Even if you explicitly do this:
[pre]
%let _ODSSTYLE=sasweb;
%let _ODSDEST=HTML;
*ProcessBody;
%stpbegin;
...rest of code;
%stpend;
[/pre]

and indicate that you want HTML results, only client apps that can -receive- HTML results will use the _ODSDEST parameter. For example, EG, the Portal, the SAS Add-in for Microsoft Office (Word and Excel) will all receive HTML results. However, PowerPoint and Web Report Studio will ONLY receive SASReport XML results --- which are NOT the same as HTML. So these 2 client apps change or ignore your _ODSDEST override and use SASReport XML to create the report. The reason you need to test your stored process in all the client apps that will be invoking the stored process is for just this reason -- a stored process might not look or work the same way in PowerPoint or WRS as it works in EG or the Portal.

So, in building your URL, you have several issues at work:
1) TARGET=NEW might work in WRS
2) WRS is receiving and rendering SASReport XML -- not HTML
3) if you change your style template to alter the HREFTARGET attribute, WRS does not use style templates -- so you'd have to change the CSS information in the XML that runs rendering in WRS.
4) there was a Tech Support note about HREFTARGET not working in CSS:
http://support.sas.com/kb/9/313.html (supposedly this was fixed in SAS 9.1, so you'd have to check with Tech Support whether HREFTARGET in CSS will work now and with the WRS CSS).
5) SASReport XML is not the same as HTML -- so you might need to code hyperlinks differently for SASReport XML (such as used in WRS) than for HTML results (such as used in other client apps).

Angela has pointed you to some examples sites in her post and if you can't get what you need by looking at the examples, then, you might wish to open a track with Tech Support.

cynthia
RSB
Calcite | Level 5 RSB
Calcite | Level 5
Has anyone found a solution to this?? All the workarounds suggested doesn't seem to work.
Madelyn_SAS
SAS Super FREQ
Links in stored processes only work in graphical output. They do not work in tables. See http://support.sas.com/kb/39/443.html. This appears to be fixed in version 4.3 (not yet released).
RSB
Calcite | Level 5 RSB
Calcite | Level 5
I was anticipating a similar answer, but just gave it a try. I have a report layout that is not feasible with the crosstab in the WRS, the only way I can get around is using Proc Report, but the challenge is with the Linked Reports.

Any Ideas on how to achieve this??

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 9 replies
  • 2371 views
  • 0 likes
  • 5 in conversation