BookmarkSubscribeRSS Feed
NN
Quartz | Level 8 NN
Quartz | Level 8
Guys,
Is it possible to present KPI in HTML using the GKPI procedure. I tried the same but i think some error crops up due to the DEVICE= JAVAIMG option.
if someone could please guide on this.
5 REPLIES 5
GraphGuy
Meteorite | Level 14
You want to display a gkpi chart in an html page (using "ods html")?
This would be one way...


%let name=gkpi13;

goptions device=javaimg;
goptions cback=white border;
goptions xpixels=600 ypixels=600;

ods html file="&name..html" nogtitle style=minimal;

goptions ftext="arial/bold";
goptions cback=graydd;

/* See new syntax changes in S0384459 */

title1 h=.2in "dial";
proc gkpi mode=raised;
dial actual=85 bounds=(0 50 75 100) /
target=66 colors=(cxFFFAFA cxF08080 cx8B0000)
avalue bvalue label='dial' name="&name" des=" ";
run;

quit;

ods html close;
NN
Quartz | Level 8 NN
Quartz | Level 8
I am trying to create the html on an external path. Hence i made the following change in the code.
ods html file = "/mypath/&name..html"
the error that i keep getting is
ERROR: Insufficient authorization to access
/sas1/config/Lev1/SAS/gkpi13.png. Message was edited by: NN
Cynthia_sas
SAS Super FREQ
Hi:
One issue you could be running into is that only the HTML file will be written to the /mypath directory. The image file (gkpi13.png) seems to be written to a directory to which you (or your job) does not have sufficient write authority.

This Tech Support note and the documentation link explain how PATH= and FILE= work in the creation of SAS/GRAPH output:
http://support.sas.com/kb/23/638.html
http://support.sas.com/documentation/cdl/en/graphref/61884/HTML/default/a003152012.htm

One modification you might try is:
[pre]
ods html path= "/mypath" (url=none)
file="&name..html";

or

ods html path= "/mypath" (url=none)
gpath="/mypath" (url=none)
file="&name..html";
[/pre]

You might be having other issues, as well. I notice that the default image location is in a Lev1 sub-directory -- this is generally one of the directory names in a SAS Enterprise Intelligence Platform installation. I wonder whether you are trying to write a stored process to create your GKPI output??? Usually, stored processes use _WEBOUT special reserved fileref instead of hard-coded file and path names for ODS output.

cynthia
NN
Quartz | Level 8 NN
Quartz | Level 8
Cynthia,
I am not writing an STP for the KPI. I was trying this on EG4.2.
I tried the modifications suggested by you.
The error no longer crops up but the Final HTML file appears balnk without any image in it.

I donot face any problems when i try creating other Bar charts or Graphs in html.
NN
Quartz | Level 8 NN
Quartz | Level 8
Robert/cynthia,
Thanks for your help the issue has been resolved.
The problem as you had suggested was that the .png file was not getting saved in the path of the html.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1506 views
  • 0 likes
  • 3 in conversation