BookmarkSubscribeRSS Feed
Yura2301
Quartz | Level 8

Hi, below is simple example of proc gplot that finally create html file test.html on some folder on server:

ODS tagsets.htmlpanel device=png body="...test.html";

proc gplot data=sashelp.class;

     plot height*weight / vaxis=axis1;

     axis1 label=(angle=90 "please change angle");

run;

ODS tagsets.htmlpanel close;


Graphic in html file is correctly presented only in IE browser, because ActiveX is mandatory for Charts representing.

But I'd like to open the Chart in Firefox, for example. So can I somehow convert this graphic(chart) to Image(png,gif) on fly, to make it possible see the Chart image in Firefox?Probably should be applied some ods options etc...

Thanks!

5 REPLIES 5
GraphGuy
Meteorite | Level 14

Try using 'goptions device=actximg;' rather than device=activex.

Or, if you're not really utilizing any of activex's special features, I'd suggest using device=png.

Yura2301
Quartz | Level 8

Hi Robert,

Thanks for your advice, In my example I put png device as one of ODS option, but looks like I should initialize device option in goption statement.

So now in EG it works correct but when I try open it manually from server - Chart isn't presented there, becouse Chart image stored in EG SAS work session instead of folder on server that I mentioned in ODS body option...

So I will try to redirect(or just copy) chart image from WORK library to needed folder on server, or may be there are some better solution?

Thanks!

GraphGuy
Meteorite | Level 14

Hopefully someone familiar with EG will respond! Smiley Happy

Yura2301
Quartz | Level 8

Hi again,

Actually this SAS code will run in STP session, so I'll be able use _webout instead of hardcoded html file on server, but I've just checked and looks like problem still actual...

Strange that png file with Chart stores in different folder that I set in body option of ODS statement.

But anyway, thanks for help:)!

Yura2301
Quartz | Level 8

Hi Again,

I fixed the problem using ODS options path and file, also I made small corrections of target html file afterwords(Firefox form path to image differ than IE), -replace absolute path to png image to relative ... src="gplot.png".

Thanks!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 928 views
  • 0 likes
  • 2 in conversation