01-21-2012 05:59 PM
Not sure I understand what you are trying to do. You could always do a print screen on an html page, save it as a gif or jpg file, and then include that file as a preimage.
01-21-2012 09:53 PM
What i am trying do is I have four html pages which have linkings to some more htmls pages...
i want to print that four html pages horizontally in the report by using ODS REGION..
if i convert that HTML files into GIF or JGP format, links not going to work..
This is the problem..
hope you understand art297....
01-22-2012 12:49 AM
I'm having a hard time figuring out what made you ask about PREIMAGE orginally. PREIMAGE would be wrong if you want to set a URL to another page. If I want to make a URL to another page or web site, I can do something such as what is shown in the program below. The URLs are the high level URL for each web site, except for the Blog category, which is a URL to one specific blog post.
So, just to clarify. The program below creates 4 URLs in a report and then when someone clicks on a hyperlink, they will go to the desired place.
In every URLVAR cell on my report, I show a URL of the site they are going to visit. What would you expect to see in every cell on the report???
length cat $8 urlvar $200;
cat = 'Search';
urlvar = 'http://www.google.com';
ods listing close;
ods html file='c:\temp\useurl.html' style=sasweb;
proc report data=stuff_to_visitnowd;
definecat / order;
defineurlvar / order order=data;
line ' ';
ods _all_ close;
01-21-2012 09:47 PM
The doc for PREIMAGE says that the style attribute points to the location of the image to be used. The location can be a simple filename and file extension; it can be a fully qualified directory path and file information; or it can be the URL of an image.
For example, in the code below, I use the URL location of the SAS Power To Know image for my PREIMAGE attribute. Note that the URL is not a URL to an HTML page. It is the server location of the image that is used when folks visit www.sas.com -- but there is a caveat. If you run this code on a machine that does not have network access, you will not see an image when the HTML file (created by ODS) loads into the browser. Art's suggestion, that you take a screenshot or print screen and then make your own gif or jpg file does not require that you know the URL -- only that you have a local copy of the image you want to use.
The PREIMAGE attribute is building an HTML standard IMG tag -- I do not believe you can use an HTML page as the SRC= value.
ods listing close;
ods html file='c:\temp\usepreimage_url.html' style=sasweb;
proc report data=sashelp.class(obs=3) nowd
title 'Use URL for PREIMAGE';
ods html close;
11-14-2014 10:04 AM
I used the proc report you proposed on Jan 21, 2012 9:47 PM, with ods rtf. However, the image is too wide for the page. Is there an option to specificy the size/width/heigth of the image?
Thank you very much.
11-14-2014 10:22 AM
I would manipulate the image before you use it in your report. Reason being is that image compression and re-sizing is something outside the scope of a non-art package. Save you image, then use some imaging program to shrink it down to a size you want, setting your own compression factors. There are free art packages out there to do such things.