Data visualization with SAS programming

Html output for GKPI

Reply
Regular Contributor
Regular Contributor
Posts: 166

Html output for GKPI

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

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

quit;

ods html close;
Regular Contributor
Regular Contributor
Posts: 166

Re: Html output for GKPI

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
SAS Super FREQ
Posts: 8,820

Re: Html output for GKPI

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
Regular Contributor
Regular Contributor
Posts: 166

Re: Html output for GKPI

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.
Regular Contributor
Regular Contributor
Posts: 166

Re: Html output for GKPI

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