The SAS Output Delivery System and reporting techniques

Instead of variables in the report table i need a image

Reply
N/A
Posts: 0

Instead of variables in the report table i need a image

Hello everyone

in a report table instead of variables i need a image. Is it possible in the
Base SAS

Can any one please tell the procedure for getting such reports.


Thanks
Sid
SAS Super FREQ
Posts: 8,868

Re: Instead of variables in the report table i need a image

Posted in reply to deleted_user
Hi:

You say that instead of variables you need an image in your report table. How will the image be created??? Is it an image like a picture of a product or picture of a person (where the image already exists) or is it an image that you will create with SAS/GRAPH or ODS GRAPHICS????

If there are not to be any variables in your report table, why not just use SAS/GRAPH or ODS GRAPHICS for your image??? If you want to mix variable values and images in a report table, then look at figure 18 in this paper:
http://www2.sas.com/proceedings/forum2007/099-2007.pdf

or at these examples of using the PREIMAGE style attribute
http://www2.sas.com/proceedings/sugi31/116-31.pdf (figures 3, 4, 5b)

or example 5 and 6 in this paper:
http://www.lexjansen.com/pharmasug/2008/sas/sa08.pdf

With the PREIMAGE or POSTIMAGE style attribute, you can insert an image into a table. Most often, people use PREIMAGE and POSTIMAGE to insert a logo into a report, but you can also insert an image into a table cell or before or after a table. Depending on your destination of choice (RTF, PDF, HTML), you may want to be sure that the image is the correct size prior to using it with ODS. Also, the method that you use with PREIMAGE/POSTIMAGE will vary depending on whether you use PROC PRINT or PROC REPORT for your report table, Most of the examples in the papers above use PROC REPORT to insert images into the report table.

cynthia
N/A
Posts: 0

Re: Instead of variables in the report table i need a image

Posted in reply to Cynthia_sas
Thanks Cynthia

in my report i want to insert a image (i.e pre existing in my system) in the column instead of the variable name. I want to do it just for one column

is it possible with PREIMAGE or POSTIMAGE attribute in BASE SAS
SAS Super FREQ
Posts: 8,868

Re: Instead of variables in the report table i need a image

Posted in reply to deleted_user
Hi:
Yes, this is possible with ODS -- ODS is part of Base SAS. However, it is NOT possible in the LISTING destination.

PREIMAGE/POSTIMAGE only work for ODS destinations that support style attribute usage and support images (ODS RTF, PDF and HTML support images; ODS CSV does not support style or images, for example). What is your destination of interest???

I have an image on my system called c:\temp\KERMIT.JPG and the program shown below uses that picture of Kermit instead of the variable name for the HEIGHT variable in my report table. If you do not have an image called KERMIT.JPG, you would have to change the image name appropriately in order to see similar results. The example below uses ODS RTF, but you could use similar syntax with ODS PDF or ODS HTML.

cynthia
[pre]
ods rtf file='c:\temp\useimage.rtf';

proc report data=sashelp.class nowd;
column name age height weight;
define name / order;
define age / display ;
define height / display ' '
style(header)={preimage='c:\temp\kermit.jpg'};
define weight /display;
run;

ods rtf close;
[/pre]
N/A
Posts: 0

Re: Instead of variables in the report table i need a image

Posted in reply to Cynthia_sas
Thank you Cynthia
Ask a Question
Discussion stats
  • 4 replies
  • 243 views
  • 0 likes
  • 2 in conversation