I am trying to insert pictures within a PROC REPORT. I believe I understand the basic mechanics, but would like the picture to shrink to fit if the cellwidth is not as wide as the picture. Is this something that can be done?
proc report data=dsn nowd; column image; define image / "TITLE" computed style(column)=[cellwidth=4in]; compute image / char; call define(_col_,'style',"style=[preimage='/path/SGPlot1.png']"); endcomp; run;
The code above is what I used to produce the PROC REPORT to insert a single image. It cuts off the right-hand side of the image because the image is just a little bit wider than the 4in cellwidth I declared. I would like it to instead shrink the image.
Or you can refit this graph when you are creating "SGPlot1.png". like:
ods graphics/width=500px height=300px image_name="SGPlot" outputfmt=png;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.