Data visualization with SAS programming

Custom Format and HTML output

Reply
Contributor
Posts: 29

Custom Format and HTML output

I think I've solved this before but can't remember if it was exactly the same - but here is the problem.

I'm creating a custom format in SAS and then creating a treemap (using gtile) to create a html page on a server.  In sas results windows everything looks fine, but when you open the html file on the server the format on the data tips is gone.  Any ideas?

code:

proc format;

picture sterling

low-<0="000,000,000,099.99" (prefix='-£')

0-high="000,000,000,099.99" (prefix='£');

run;

ods listing close;

ods html file="treemap.html";

goptions reset=all device=activex;

proc gtile data=aaa; format totalbalance sterling.;

tile totalaccts

tileby=(status, segment)

/

colorvar=totalbalance

colorramp=(red white green)

detaillevel=1

;

run;

quit;

ods html close;

ods listing;

Grand Advisor
Posts: 10,248

Re: Custom Format and HTML output

I am guessing that this may be a path definition problem and that when moved to the server at least one element is looking in an inaccessible location from the server.

Valued Guide
Posts: 632

Re: Custom Format and HTML output

Sometimes the (url=none) option will help as it changes how the path is embedded within the HTML itself.

SAS Super FREQ
Posts: 8,721

Re: Custom Format and HTML output

Hi:

I'm confused about what the issue is. Is the issue that you cannot see a picture at all, that you cannot see the tool tips at all or that you are not seeing the pound sterling sign with the format applied to the tool tips? I ran a modified version of your code using SASHELP.PRDSALE, but with your format for ACTUAL and PREDICT, using SAS 9.3 and I do see the pound sterling sign. So, you might want to consider opening a track with Tech Support if you are not seeing the tool tips as you expect.

cynthia


pound_on_actual.png
Contributor
Posts: 29

Re: Custom Format and HTML output

Hi, when i output the html i output it to another server address, and when i access the html from that server via internet explorer the formats are lost.  If i output to the server i have sas running on then the format remains in place either through the sas results window or internet explorer.  The server that I am placing the html on has the sas graph activex programme installed but there seems to an issue in moving the custom format over to the new server - hope that makes sense.

regards

Antony

Contributor
Posts: 29

Re: Custom Format and HTML output

for further clarity I can see the picture, i can drill down and everything works as normal and as should except that the tool tips do not have the applied formats.  Further, I've just discovered that if i use internet explorer on the server with sas to open the file on the other server i see the formats!  I'm clearly missing an add-in or some process for the non-sas server.  hope that makes it clearer.

Antony

Contributor
Posts: 29

Re: Custom Format and HTML output

I'm trying this now I'll let you know what happens!

Contributor
Posts: 29

Re: Custom Format and HTML output

I tried the url=none option and it didn't seem to help - thanks though.

Antony

Esteemed Advisor
Posts: 7,300

Re: Custom Format and HTML output

When you try to open the file on the other server, directly, what kind of browser are you using?  Also, can you post your html file?

Contributor
Posts: 29

Re: Custom Format and HTML output

I'm using ie9 on the server that doesn't work (just lost formats) and i think it's ie8 on the server that does.  I can't upload the html as it contains confidential information about the size of the business i work in - sorry - but i checked it out and at the end there is definitely a reference to the bespoke format if that helps.

SAS Employee
Posts: 967

Re: Custom Format and HTML output

And what version of the SAS/Graph Activex Control is installed into each of those browsers?...

(The reason this is important is that user-defined-formats have not always been supported, and even after they were supported there were a few enhancements/bug-fixes in various versions along the way...)

SAS Employee
Posts: 967

Re: Custom Format and HTML output

When you view the output that does, and doesn't, work ... are you viewing them using the exact same IE browser session?  ... Or two different browser sessions?  (on different machines?)

If two different browser sessions, are they running the exact same version of IE?  And do they both have the exact same version of the SAS/Graph Activex Control? (right-mouse-button -> Help -> About Graph Control)

Contributor
Posts: 29

Re: Custom Format and HTML output

two different browser sessions, each on a different machine.  the one that doesn't work is ie9 (sas/graph activex version 9.3.0.11158.32) and ie8 (sas/graph activex version 9.3.0.11158.32).  interestingly it doesn't work for standard formats either (tried it with dollarx. but nothing).  I now have a scenario where the version 8 browser shows the £ and comma formats and the version 9 browser shows a range 0-1 on the colorramp and a blank space in the tool tip.  I unfortunately do not have access to a version 9/8 browser on each of the servers so i can't test machine spec and my version 8 ie at home also doesn't show the £ sign which suggests it's missing a base sas component/background file?

Valued Guide
Posts: 2,174

Re: Custom Format and HTML output

IF it was only a problem of user-formats you could try the built-in format NLMNY. There are others I believe prefixed EUR.

Contributor
Posts: 29

Re: Custom Format and HTML output

There seems to be an even bigger problem in that the numerical value displayed in the tool tip for the specified colorvar variable is incorrect - it's only correct when there is only 1 variable specified in the tileby statement.  This is clearly something to do with my dataset and missing values as the process works on sashelp datasets - I'll try and fix and see if that help/impacts formats!

Ask a Question
Discussion stats
  • 15 replies
  • 568 views
  • 0 likes
  • 7 in conversation