Your SAS programs, embedded in web apps and elsewhere

Images in Stored Procedure URL Display Portlet

Accepted Solution Solved
Reply
Super Contributor
Posts: 497
Accepted Solution

Images in Stored Procedure URL Display Portlet

In SAS 9.2 I have a stored procedure that I am displaying in a URL display portlet.  What is the best location to store images such that I can call them in the stored processes.

I wasn’t sure if this should be in the stored processes section or SAS / Graph and ODS Graphics.


The display code is:


<IMG SRC="/SASStoredProcess/do?_program=

      /WebApps/Utilities/Sales+by+Product&XPIXELS=

400&YPIXELS=300">


SAS Stored Processes: Embedding Graphics


Accepted Solutions
Solution
‎04-16-2015 02:42 PM
PROC Star
Posts: 1,322

Re: Images in Stored Procedure URL Display Portlet

Posted in reply to DavidPhillips2

If you want to have, for example, a SAS procedure (GPLOT, SGPLOT, PROC TABULATE, etc) create a little html page that incorporates an image, I would put the image file somewhere that the SAS server can see.  Then use the style template or proc syntax or whatever to display the image.

This paper for example describes how PROC REPORT can insert images into output.

http://www2.sas.com/proceedings/sugi27/p187-27.pdf

This paper has examples of inserting logos with SGPLOT

https://support.sas.com/resources/papers/proceedings11/277-2011.pdf

HTH.

View solution in original post


All Replies
PROC Star
Posts: 1,322

Re: Images in Stored Procedure URL Display Portlet

Posted in reply to DavidPhillips2

What do you mean by call them [images] in the stored process?

  • you want the stored process to generate an image (graph or whatever) and display it?
  • you want the stored process to generate an html page that includes a link to an image already sitting on your web server (like a logo)?
  • something else?
Super Contributor
Posts: 497

Re: Images in Stored Procedure URL Display Portlet

I want to display a logo.

Solution
‎04-16-2015 02:42 PM
PROC Star
Posts: 1,322

Re: Images in Stored Procedure URL Display Portlet

Posted in reply to DavidPhillips2

If you want to have, for example, a SAS procedure (GPLOT, SGPLOT, PROC TABULATE, etc) create a little html page that incorporates an image, I would put the image file somewhere that the SAS server can see.  Then use the style template or proc syntax or whatever to display the image.

This paper for example describes how PROC REPORT can insert images into output.

http://www2.sas.com/proceedings/sugi27/p187-27.pdf

This paper has examples of inserting logos with SGPLOT

https://support.sas.com/resources/papers/proceedings11/277-2011.pdf

HTH.

Super Contributor
Posts: 497

Re: Images in Stored Procedure URL Display Portlet

On the same server that the stored procedure is being called from.

PUT "<tr><td><IMG SRC='https://myserver/banner.jpg'><td><tr>";

This link http://support.sas.com/kb/34/138.html did not work for me but might be useful for someone else.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 780 views
  • 0 likes
  • 2 in conversation