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
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.