GREPLAY Procedure

Considerations for Replaying a Graph

Replaying a Graph with a Border

In SAS 9.1.3, when you request that a border be drawn around your graph, the border is drawn around the graph inside the graph GRSEG. In SAS 9.2 and later versions, when you request that a border be drawn around your graph, if the ODS output destination that you are using supports drawing a border around the graph, the border is drawn outside of the graph GRSEG by ODS. Otherwise, the border is drawn around the graph inside the graph GRSEG as is done in SAS 9.1.3.
Note: When the BORDER option is used with the GSLIDE procedure, a border is drawn around the slide inside the slide GRSEG regardless of whether the ODS destination supports drawing a border around the graph.
The ODS HTML destination supports drawing a border around a graph when a border is requested, while the ODS LISTING, ODS PDF, ODS RTF, and ODS PRINTER destinations do not. When you replay a graph with a border, if you replay the graph to the same ODS destination that was used to generate the original graph, the graph should replay without any problems. However, in the following replay scenarios, you might encounter unexpected results with respect to the border in the replayed graph:
  • When you replay a graph with a border that was generated with the ODS LISTING, PDF, RTF, or PRINTER destination to the ODS HTML destination, the replayed graph might have a double border drawn around it. The double border occurs when the original graph GRSEG already contains a border and the ODS HTML destination draws a second border around it.
  • When you replay a graph with a border that was generated with the ODS HTML destination to the ODS LISTING, PDF, RTF, or PRINTER destination, the replayed graph does not have a border. The border is missing because the border in the original graph is not contained in the graph GRSEG.
In the case of a double border, to remove the second border, you can specify the NOBORDER graphics option when you replay the graph. In the case of the missing border, you can create a GREPLAY template that draws a border around the output panel and then replay the GRSEG using that template. In your template code, specify the COLOR=color option in the GREPLAY procedure TDEF statement. The COLOR= option draws a border around the graph in the new GRSEG. See COLOR=border-color and Replaying a Graph to Multiple Destinations.

Replaying a Graph with Titles and Footnotes

If your graph contains titles, footnotes, or both, and you use the NOGTITLE and NOGFOOTNOTE options on your ODS statement, the titles and footnotes are rendered outside of the graph. They are not included in the GRSEG in that case. See Controlling Titles and Footnotes. As a result, when you replay the graphs using the GREPLAY REPLAY or TREPLAY statement, the titles and footnotes do not appear in the replay output. If you include titles and footnotes with your graphs and you intend to replay the graphs using GREPLAY, make sure that you do not use the NOGTITLE and NOGFOOTNOTE options in your ODS statement.