BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello dear sas users. thank you cynthia for your answer at my last question.
I have a question :
Is there another way to put some image in a rtf file or in a pdf file except this code :

data nothing1;
line="first graph";
run;

ods listing close;

ods rtf file='G:/assens/image/grafods1.rtf' ;
ods escapechar='^';
title j=c "^S={preimage='G:\myimage.jpg'}";

proc report data=nothing1 noheader Headline Headskip ls=150 nowd;
column line;
define line /display "" width=30 left;
run;

ods rtf close;
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
"Some image" is vague. The basic ODS sandwich technique can be used to put SAS/Graph images into your ODS output:
[pre]
ods rtf file='wombat.rtf';

....PROC GCHART or PROC GSLIDE or PROC GPLOT...

ods rtf close;
[/pre]

The technique that you show:
[pre]
title j=c "^S={preimage='G:\myimage.jpg'}";
[/pre]

... is how people frequently get corporate logos or other images into their output -- by putting the image into the SAS TITLE statement.


If you were producing a shoe catalog, with PROC PRINT for example, and you wanted a picture of a particular style shoe -- so that the repoprt row showed the picture of the shoe, the style name and the MSRP, then you could use the PREIMAGE attribute on the VAR statement for the PROC PRINT -- probably with a user defined format, so each shoe style would get a different image.

If you are having trouble with SAS/Graph and/or PROC GREPLAY or you need more help with the preimage= attribute, your best bet for help is to contact SAS Tech Support. They can look at your graphical image and help you come up with the best technique to get it into your report.

cynthia

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!

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.

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
  • 1 reply
  • 2141 views
  • 0 likes
  • 2 in conversation