BookmarkSubscribeRSS Feed
kuridisanjeev
Quartz | Level 8

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

can you suggest any one plz???

6 REPLIES 6
art297
Opal | Level 21

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.

kuridisanjeev
Quartz | Level 8

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

Cynthia_sas
SAS Super FREQ

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;

Cynthia_sas
SAS Super FREQ

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;

noisette1325
Calcite | Level 5

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

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 2973 views
  • 0 likes
  • 5 in conversation