Hi SAS Community!
This is my first time working with image column in SAS EG. Now, I need help in extracting an Image (BLOB Jpeg Image) from the DB table and have it embedded on an HTML report.
The user must be able to download the image once it's clicked on the HTML Report.
What I have done so far:
-Tried to download on unix server and reference the images on the proc report, but users doesn't have access on the unix server path in order to download.
Here's what I researched, please correct me if I am wrong since I'm really lost right now:
-The column IDPIC value starts with something like this (sample=FFD8FFE000104A4649460001010000480048) which is in hexadecimal format.
-I don't need to download the image on my local (Unix server) for me to embed it to HTML.
-From the hexadecimal format, I need to convert it into RAW binary format first (sample=ÿØÿàJFIFHHÿáExifMM*JR(iZHH ö Ñÿí8Photoshop3.08BIM8BIM%ÔÙ²éìøB~ÿâ)
before converting it into base-64 (this is the format that can be embedded on PROC Report)
-SAS EG doesn't have a built in base64 encode function.
Here's my code:
Your replies would be of great help! Thank you! 😊
Hello, the requirement is to embed the image on the excel report that's supposed to be generated when the "export to excel" link was clicked on the SAS HTML Report.
Also, if my understanding is correct, does that mean I have to download the image elsewhere first?
that's awesome
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.
Ready to level-up your skills? Choose your own adventure.