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

Hi. 

 

I have a dashboard saved in unix server as jpeg/png. Trying to send it to folks in email not as attachment. I have tried couple different ways, 

1. put image in proc report as style - it didn't transfer to email

2. ods html text ods html text='<img src="/xxx/images/xxx.jpg"></img>';

 

None of them worked well. Please help me getting this work out. 

 

Thanks!!

 

1 ACCEPTED SOLUTION

Accepted Solutions
AllanBowe
Barite | Level 11

The best approach would be to move your png over to the content server and reference it there, but if that's not an option - there's the base64 fallback.

 

The 'trick' is to know that image files (such as a png) can be converted and read into your <img> tag as text - as explained in this communities post, the syntax is like:

 

<img src="data&colon;image/png;base64,R0lGODlhEAAQAKL/AP//////
AMDAwMDAwICAgICA\AAAAAAAAACH5BAEAAAIALAAAAAAQAB
AAAANFKEpMpjAKAkYYTkJqu2sbII6kSCzApXbqM1VrPLiUWpYGFwB
F7/+51ID3KwaHReNrlwS+iM0CTRTtTavSjWHL7W41YE0CADs=">

 

But how do you get your dashboard converted to base64 encoding?  Thankfully Michael Dixon has a SAS script that will do just that, check out this post.

 

Hopefully this will get you on your way.

 

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs

View solution in original post

1 REPLY 1
AllanBowe
Barite | Level 11

The best approach would be to move your png over to the content server and reference it there, but if that's not an option - there's the base64 fallback.

 

The 'trick' is to know that image files (such as a png) can be converted and read into your <img> tag as text - as explained in this communities post, the syntax is like:

 

<img src="data&colon;image/png;base64,R0lGODlhEAAQAKL/AP//////
AMDAwMDAwICAgICA\AAAAAAAAACH5BAEAAAIALAAAAAAQAB
AAAANFKEpMpjAKAkYYTkJqu2sbII6kSCzApXbqM1VrPLiUWpYGFwB
F7/+51ID3KwaHReNrlwS+iM0CTRTtTavSjWHL7W41YE0CADs=">

 

But how do you get your dashboard converted to base64 encoding?  Thankfully Michael Dixon has a SAS script that will do just that, check out this post.

 

Hopefully this will get you on your way.

 

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 1 reply
  • 2776 views
  • 1 like
  • 2 in conversation