Hi:
Although "GRSEG" in a CALL DEFINE as the 2nd argument appears to work in some instances, it is not documented as an argument in the PROC REPORT documentation: http://go.documentation.sas.com/?docsetId=proc&docsetTarget=n1b1be5822k8nnn1s1ucv8fvpg3d.htm&docsetVersion=9.4&locale=en --therefore, behavior is unreliable if this is an undocumented feature or artifact from previous versions of SAS. When I use GRSEG as the 2nd argument in a COMPUTE BEFORE, it does appear to work. However, if I use GRSEG as the 2nd argument in a COMPUTE AFTER, it does NOT work for PDF, as shown below (although it does work for HTML):
On the other hand, if I make a .PNG file from my GCHART step and store that PNG file in C:\temp (where I will write both the HTML and PDF output), and then use "STYLE" as the 2nd argument with PREIMAGE=, the image insertion works in PDF and in HTML, as shown below:
If you want to continue exploring your GRSEG approach, then I would recommend working with Tech Support to find out whether this is a valid argument for all destinations or not.
Otherwise, using STYLE in the CALL DEFINE, seems to behave the way you want. I recommend making sure your image is the right size to fit in the cell or row where you want to place it. For another example of using images based on a particular cell value, please see the example on page 14-15 of this http://www2.sas.com/proceedings/forum2007/099-2007.pdf paper. Although the paper does show mostly using inline formatting with ODS ESCAPECHAR, it also shows a user-defined format to insert an image based on a cell value. Look at the DEFINE statement for PRODUCT. It has preimage in a TITLE statement to put the big logo at the very top of the page, but then places an image in every cell, based on the value of the PRODUCT variable:
Hope this gives you an alternative to using "GRSEG" in your CALL DEFINE statement.
Cynthia
... View more