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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of 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
  • 985 views
  • 0 likes
  • 2 in conversation