- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
All:
I have SAS Code below, and upon SAS Job Execution, it doesn't render sgplot image.
ods graphics on / outputfmt=png;
ODS HTML style=HTMLBlue file=_webout gpath= _ODSOPTIONS = options(BITMAP_MODE='inline');
proc sgplot data=xxx ;
title; footnote;
by year;
xaxis type=linear min=&min_y. max=&max_y. values=(&min_y. to &max_y. by 1);
series x=time y=estrips / name="mrfss" lineattrs=(thickness=1.85 color=black) markers markerattrs=(size=3.5px color=black) break;
series x=time y=lower_eff / name="mrfss_ci" lineattrs=(thickness=1.7 pattern=ShortDash color=ligr) break legendlabel="95% Confidence Interval" markers markerattrs=(symbol=x size=4px color=gray);
series x=time y=upper_eff / lineattrs=(thickness=1.7 pattern=ShortDash color=ligr) break legendlabel=" " markers markerattrs=(symbol=x size=4px color=gray);
yaxis offsetmin=0 ;
run;
ods html close;
ods graphics off;
I am getting ...When I right click on the image, it can be open in another tab, and it shows the image.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Some questions and considerations:
- Where are you running this? Is it in SAS Viya or SAS Enterprise Guide? If using another coding environment like SAS Studio or SAS Enterprise Guide, these tools add their own ODS HTML5 statements that might interfere.
- Speaking of ODS HTML5, I believe you should be using that (not ODS HTML) if you want embedded images (where the image data is part of the HTML and not a separate file).
- You might also consider using SVG as the image format (scalable vector graphics), as that does well when embedded in HTML and of course the images render nicely even as you enlarge or shrink the view in the browser.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Happy Holidays !
I am using SAS JOB execution component.
Regards,
Gpatel
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
ODS HTML style=HTMLBlue body='render.html' path='c:\temp\' ;
proc sgplot data=xxx ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reading and responding to my post.
I am using SAS JOB Execution, and sgplot doesn’t render images. When I right click, and show images, it displays though.
Any clue?
Happy Holidays!
Regards,
GPatel
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
That why I use PAHT= option.
Talk to your SAS or OS Administrator to see if the image and html file are under the same path.
Also you could check 'ods listing gpath= ' which is the defaut path of image genreated by proc sgplot:
ods listing gpath='c:\temp\' ;
ODS HTML style=HTMLBlue body='render.html' path='c:\temp\' ;
proc sgplot data=xxx ;
.......
ODS HTML style=HTMLBlue body='render.html' path='c:\temp\' ;
proc sgplot data=xxx ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your response, with detailed explanations. SAS VIYA JOB
Execution handles html / pdf / excel file output mechanism differently.
For Excel, it works with the following code :
filename f_xlxp filesrvc parenturi="&SYS_JES_JOB_URI"
name="NR.xml"
contenttype='application/vnd.ms-excel'
contentdisp='attachment; filename="test.xlsx"';
Appreciate your time and interest.
Thanks, GPatel