Hello everybody!
I have a dataset which have a field named photo and contains a base64 value that represents a photo. I would like to display in SAS Visual Analytics' report.
Any Idea about how can I display in a SAS Visual Analytics report?
Thanks in advance.
Hi,
Depending on how you want to display the image, you may want to opt for a Data-Driven Content object.
The DDC object receives data from the report as any other object. You need to create an HTML page which receives the data and displays the base64 image. You can find examples of DDC object and code on different articles in the communities.sas.com.
In your case, after receiving the data you should use JavaScript to generate the img tag(s). The src property of your image should look like this:
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4 //8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="
Let me know if you need more information about how to proceed.
Regards,
Xavier
Hi,
Depending on how you want to display the image, you may want to opt for a Data-Driven Content object.
The DDC object receives data from the report as any other object. You need to create an HTML page which receives the data and displays the base64 image. You can find examples of DDC object and code on different articles in the communities.sas.com.
In your case, after receiving the data you should use JavaScript to generate the img tag(s). The src property of your image should look like this:
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4 //8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="
Let me know if you need more information about how to proceed.
Regards,
Xavier
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!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.