Data visualization with SAS programming

Html output for GKPI

Regular Contributor
Regular Contributor
Posts: 166

Html output for GKPI

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.
SAS Employee
Posts: 990

Re: Html output for GKPI

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=" ";


ods html close;
Regular Contributor
Regular Contributor
Posts: 166

Re: Html output for GKPI

Posted in reply to RobertAllison_SAS
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
Posts: 9,031

Re: Html output for GKPI

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:

One modification you might try is:
ods html path= "/mypath" (url=none)


ods html path= "/mypath" (url=none)
gpath="/mypath" (url=none)

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.

Regular Contributor
Regular Contributor
Posts: 166

Re: Html output for GKPI

Posted in reply to Cynthia_sas
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.
Regular Contributor
Regular Contributor
Posts: 166

Re: Html output for GKPI

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.
Ask a Question
Discussion stats
  • 5 replies
  • 3 in conversation