Help using Base SAS procedures

pre image in proc report

Reply
Super Contributor
Posts: 276

pre image in proc report

Is it posiible to use a html page in proc report pre image option???

can you suggest any one plz???

PROC Star
Posts: 7,474

pre image in proc report

Posted in reply to kuridisanjeev

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.

Super Contributor
Posts: 276

pre image in proc report

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....

SAS Super FREQ
Posts: 8,866

pre image in proc report

Posted in reply to kuridisanjeev

Hi:

  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???

cynthia

data stuff_to_visit;

length cat $8 urlvar $200;

cat='Game';

urlvar ='http://www.websudoku.com/';

output;

cat='Blog';

urlvar='http://blogs.sas.com/content/sasdummy/2012/01/11/uncovering-the-hidden-parts-of-the-sas-log/';

output;

cat = 'Search';

urlvar = 'http://www.google.com';

output;

cat='Search';

urlvar='http://www.altavista.com';

output;

run;

    

ods listing close;

title;

ods html file='c:\temp\useurl.html' style=sasweb;

    

proc report data=stuff_to_visitnowd;

  columncat urlvar;

  definecat / order;

  defineurlvar / order order=data;

  computeafter cat;

   line ' ';

  endcomp;

  computeurlvar;

   call define(_col_,'url',urlvar);

  endcomp;

run;

    

ods _all_ close;

SAS Super FREQ
Posts: 8,866

pre image in proc report

Posted in reply to kuridisanjeev

Hi:

  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.

cynthia

ods listing close;

ods html file='c:\temp\usepreimage_url.html' style=sasweb;

    

proc report data=sashelp.class(obs=3) nowd

     style(report)=

      {preimage="http://www.sas.com/images/logos/SAS_TPTK_logo.gif"};

title 'Use URL for PREIMAGE';

run;

    

ods html close;

N/A
Posts: 1

Re: pre image in proc report

Posted in reply to Cynthia_sas

Dear Cynthia,


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.


JF

Super User
Super User
Posts: 7,955

Re: pre image in proc report

Posted in reply to noisette1325

Hi,

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.

Ask a Question
Discussion stats
  • 6 replies
  • 1186 views
  • 0 likes
  • 5 in conversation