The SAS Output Delivery System and reporting techniques

ods document with sasgraph and future ods replay

Reply
Super Contributor
Posts: 273

ods document with sasgraph and future ods replay

Cynthia suggest to repost this here:

when creating a classic graph with ods document with goptions like

[pre]
ods document name=WORKA.graphDOC(write) cat=WORKA.catdoc;
goptions dev=gif ftext="Swiss" keymap=winansi xpixels=1000 ypixels=500 ;
..
[/pre]

there is on the log the indication of the creation of a gif ot png or ...file
generally inside d:\My SAS Files\9.2\
depending of the choice of device ...
but the grseg's are in the external catalog.

My question
how to manage the replay in 9.2 .2 or .3 as
1) we will replay from document using this external catalog
2)not necessarly in a destination compatible with the by default device of the destination

as in 9.2
ods pdf use a pdfc device by defaut
ods rtf a emf device
and ods html a png device

Is the java or activex and variation the only solution in matter of graphics
and then without cat= ?

And may i have from sas some comments
in matter of new png odsgraphics or sg proc in relation to the
goal of ods document postponing real ods production?

TIA
Andre
SAS Employee
Posts: 174

Re: ods document with sasgraph and future ods replay

Andre,

You are correct that generating GRSEG-based graphics bakes in image characteristics that are not ideal for all ODS destinations during document replay. You correctly surmise that using DEVICE options ACTIVEX, ACTXIMG, JAVA, and JAVAIMG will result in the persistence of GRAPH output that will replay nicely for all active ODS destinations. For those options, CAT= is irrelevant. CAT= applies only to GRSEG-based graphics.

All graphics output created with ODS GRAPHICS ON; or the SG procedures will replay nicely for all active ODS destinations.

-- David Kelley, SAS
Super Contributor
Posts: 273

Re: ods document with sasgraph and future ods replay

Thank you David.
May we go further a little in matter replay

after having done a) sgscatterplot b) gplot with javaimg and c) classical gplot with png
the replay works in rtf
but for html i encounter two problems
1) for a) and c)
this kind of lines in the code
[pre]
img alt="Export en MKtonnes" src="gplot.png" style=" border-width: 0px; height: 600px; width: 800px;" border="0" class="c Graph"
or
img alt="Procédure SGScatter" src="SGScatter2.png" style=" height: 480px; width: 640px;" border="0" class="c"
[/pre]
and for b) the java creation there lines like
[pre]
map name="#LN00046"

Area shape="poly" alt="DATE : 1980
iron/steel exports in million tons : 5.11" title="DATE : 1980
iron/steel exports in million tons : 5.11" coords="723,285,715,285,713,281,710,285,702,285,709,287,706,290,713,288,719,290,717,287,723,285"/

and

img alt="Export en MKtonnes" src="gplot1.png" style=" border-width: 0px; height: 400px; width: 750px;" border="0" usemap="##LN00046" class="c Graph"

[/pre]

but in firefox (it accept generaly java construction but not activex construction)
and IE8
the frames are empty

There is a lack of path
Is there a easy way to indicate it in the replay of every graphics
as all those reference were going in fact inside
d:/My SAS Files/9.2/


TIA
Andre

try code
[pre]
ods listing;
ods document name=WORKA.SGgraphDOC(write) ;
ods graphics /width=800 height=500 imagemap=on;
proc sgscatter data=sashelp.class;
plot height * weight;
run;
ods graphics off;
ods document close;
ods listing;
...
proc document name=usage.SGgraphdoc;
replay ;
run;
[/pre]
Super Contributor
Posts: 273

Re: ods document with sasgraph and future ods replay

some more indication or surprise

- for html even if i put a (url=none) after the filename

-my last try for pdf
i observe that only the sgscatterplot has maintain the original dimensions
the two others defined with
[pre]
goptions dev=javaimg ftext="Swiss" keymap=winansi xpixels=750 ypixels=400 ;
[/pre]
were growing leaving any original scale to fit in the entire page

In that case, do the use of hsize and vsize resolve the problem for pdf?

With all those answers, i think i shal have an indication for the real use of proc document in matter of graphics

Andre
Super Contributor
Posts: 273

Re: ods document with sasgraph and future ods replay

one last remark (to forward to the developpers)
related to a detail you have furnished in a recent answer in that forum
with this code and an external text file with only two lines
[pre]
ods listing close;
ods html file="d:\tabsas\documenthtm.htm"(url=none) style=analysis;
ods rtf file="d:\tabsas\documentrtf.rtf" style=ocean;
ods pdf file="d:\tabsas\documentpdf.pdf" style=analysis;
proc document name=usage.premdoc;
replay \tabulate#1\ ^ /levels=all dest=(rtf);
replay \Tabulate#1\ByGroup3#1\Report#1\Table#1 /dest=(html pdf) ;
replay \Univariate#1\ByGroup2#1 ;
run;
proc document name=usage.graphdoc;
import textfile="d:\tabsas\text.txt" to ^;
replay ;
run;
proc document name=usage.SGgraphdoc;
replay ;
run;
quit;
ods _all_ close;ods listing;
[/pre]

i have observed that in the PDF destination only
together with thus a classical graph replayed from an external catalog
the added text is
divided in two lines
the first one is inside the graph near the top of the y axis
and the second line create a new page
with the line in question AND a replay of the head of the univariate
that was not present in page n-1 but well in page n-2

I understand that you were saying "undocumented"

Andre
SAS Employee
Posts: 174

Re: ods document with sasgraph and future ods replay

Andre,

Could you open a track with Technical Support? They're the best positioned to address your questions. They'll contact developers to obtain information, if need be.

-- David Kelley, SAS
Ask a Question
Discussion stats
  • 5 replies
  • 234 views
  • 0 likes
  • 2 in conversation