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
Diamond | Level 26

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
Diamond | Level 26

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
Diamond | Level 26
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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1561 views
  • 0 likes
  • 2 in conversation