The SAS Output Delivery System and reporting techniques

insert an image

Reply
N/A
Posts: 0

insert an image

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;
SAS Super FREQ
Posts: 8,743

Re: insert an image

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
Ask a Question
Discussion stats
  • 1 reply
  • 422 views
  • 0 likes
  • 2 in conversation