BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
xxformat_com
Barite | Level 11

Hi,

 

Right now we can add images in reports using postimage.

 

ods pdf file="&demo./reporting/test.pdf";

proc report data=sashelp.class; 
    columns sex age height weight; 
    define sex    / display '0D'x  style(header)=[postimage="&demo./images/gender.JPG"]; 
    define age    / display '0D'x  style(header)=[postimage="&demo./images/age.JPG"];
    define height / display '0D'x  style(header)=[postimage="&demo./images/height.JPG"];
    define weight / display '0D'x  style(header)=[postimage="&demo./images/weight.JPG"];
run;
ods pdf 

 

I was wondering on whether there is any plan in future SAS release to using the label/attrib statement to create labels which would include images?

 

Best Regards,

Véronique

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  Depending on the ODS destination you're using, you can use ODS ESCAPECHAR in a LABEL statement to insert an image. But the destination has to support images (for example, using an image with CSV in a LABEL statement will not work).

Cynthia

 

Here's an example:image_label.png

View solution in original post

4 REPLIES 4
Cynthia_sas
SAS Super FREQ

Hi:

  Depending on the ODS destination you're using, you can use ODS ESCAPECHAR in a LABEL statement to insert an image. But the destination has to support images (for example, using an image with CSV in a LABEL statement will not work).

Cynthia

 

Here's an example:image_label.png

xxformat_com
Barite | Level 11

Note that with proc report, if you're using slash and not backslash in the path, the default split= option should be modified, e.g. split='*', because split='/' is used by default.

Cynthia_sas
SAS Super FREQ
Hi:
When I am using images in a LABEL, I prefer to use newline for the split, and then I can use the label with other procedures, not just PROC REPORT. Only PROC REPORT and PROC PRINT have a split= option. Other procedures, like TABULATE and FREQ support the LABEL statement, but not a SPLIT= option.
Cynthia

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 930 views
  • 0 likes
  • 2 in conversation