BookmarkSubscribeRSS Feed
Ahsan
Calcite | Level 5

Hi,

 

I am helping one of the user I export the client SAS map from into html format it ask to install sasgraph.exe which I downloaded and it show's the graph in html format on the browser. My question is that the client is asking if there is a way to see the graph on the browser without installing sasgraph.exe.

 

Thank You

23 REPLIES 23
PaigeMiller
Diamond | Level 26

@Ahsan wrote:

Hi,

 

I am helping one of the user I export the client SAS map from into html format it ask to install sasgraph.exe which I downloaded and it show's the graph in html format on the browser. My question is that the client is asking if there is a way to see the graph on the browser without installing sasgraph.exe.

 



If you mean, can other people who do not have SAS/GRAPH (or even SAS) see the .html output, the answer is yes. You just have to write it to a server location that people have access to, and then provide the full path to the .html file that is created.

 

Is that what you are asking?

--
Paige Miller
Ahsan
Calcite | Level 5
yes that what I am asking. That's the code SAS Enterprise generated.
%_eg_conditional_dropds(WORK.MAPCHARTMAPPREP);
PROC SQL;
CREATE VIEW WORK.MAPCHARTMAPPREP AS
SELECT *
FROM MAPSGFK.US_COUNTIES
WHERE STATECODE = 'NC'
;
QUIT;

%_eg_conditional_dropds(WORK.MAPCHARTRESPONSEPREP);
PROC SQL;
CREATE VIEW WORK.MAPCHARTRESPONSEPREP AS
SELECT *
FROM WORK.deviations_by_county
;
QUIT;

GOPTIONS CBACK=
;

PATTERN1 VALUE=SOLID COLOR=CX99CC00;
PATTERN2 VALUE=SOLID COLOR=WHITE;
PATTERN3 VALUE=SOLID COLOR=YELLOW;
PATTERN4 VALUE=SOLID COLOR=CXFF6600;
PATTERN5 VALUE=SOLID COLOR=RED;

LEGEND1
DOWN=5
FRAME
LABEL=( FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT "Light green counties have unusually LOW per enrollee spending. "
FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT "White counties have spending per enrollee that is within plus or minus one standard deviation from the mean. "
FONT='Times New Roman' HEIGHT=14pt JUSTIFY=LEFT "Yellow, orange, and red counties have unusually HIGH per enrollee spending.")
;

TITLE;FOOTNOTE;

TITLE1 "NEMT Per Medicaid Enrollee Spend by County";
TITLE2 "Standard Deviations Above or Below Average";

FOOTNOTE1 "";

ods html body="test.htm"
(title="NEMT spending by county") style=htmlblue

/* this successfully creates a test.htm file in the EXMAP library, but the file is blank,
and this isn't the destination I actually want anyway*/
path="/sas/RA/nc_dhhs/OIA/ContinuousAudit/ContinuousAuditShared/CommonResources/ExampleMapProject"

/*I'm trying to export to desktop using either of the paths below but it's not working yet. */
/*path="/sas/sas94/sas94config/Lev5/SASApp"*/
/*path="//trvwcfs02/NC_SAS_PROD/bwhite6/Desktop/_sas_sas94_sas94config_Lev5_SASApp_test_htm.html"*/
(url=none);
ods html close;
/* while the HTML files don't work, this code does successfully generate a map
in a SAS Report format. I then tried opening the SAS report and using SAS EG
"Export" or "Send To" to generate an HTML file I can share with others.
I'm able to create an HTML file but it doesn't display the map. */

PROC GMAP GOUT=MAPCHART DATA=WORK.MAPCHARTRESPONSEPREP MAP=WORK.MAPCHARTMAPPREP ALL;
ID STATE COUNTY;
choro Deviations /
WOUTLINE=1
CDEFAULT=BLACK
DISCRETE
LEGEND=LEGEND1 html=tooltip
;
RUN;
QUIT;

TITLE;FOOTNOTE;

GOPTIONS RESET=LEGEND;

GOPTIONS RESET=PATTERN;

GOPTIONS CBACK=;

%_eg_conditional_dropds(WORK.MAPCHARTRESPONSEPREP);
%_eg_conditional_dropds(WORK.MAPCHARTMAPPREP);

/* -------------------------------------------------------------------
End of task code
------------------------------------------------------------------- */
PaigeMiller
Diamond | Level 26

That's the code SAS Enterprise generated

 

Do you mean Enterprise Guide, or Enterprise Miner, or something else?

--
Paige Miller
Ahsan
Calcite | Level 5
Enterprise guide that's the code client wrote actually.
PaigeMiller
Diamond | Level 26

l'm not an expert on Enterprise Guide, but I believe all you have to do is define a server location that everyone can access in the ODS HTML statement

 

ods html file='graph.html' path='\\server\folder\subfolder' gpath='\\server\folder\subfolder';
proc gmap data=whatever;
    ... lines of code ....
run;
quit;
ods html close;
--
Paige Miller
Ahsan
Calcite | Level 5
thank you for your help I see the map in html format. When I try to export and save it on to desktop then send it html link to the client it ask them to install sasgraph.exe do you know why is that.
Reeza
Super User

Try creating an HTML5 doc and sending that over.

Ahsan
Calcite | Level 5
how do we do that.
Reeza
Super User

Change ODS HTML to ODS HTML5

 

And/or change the output selection in the drop down. 

PaigeMiller
Diamond | Level 26

@Ahsan wrote:
thank you for your help I see the map in html format. When I try to export and save it on to desktop then send it html link to the client it ask them to install sasgraph.exe do you know why is that.

There's no way that anybody can answer this without a lot more information. What html link are you sending? Does your client have access to the server location where the .html file is located?

 

What do you mean "when I try to export and save it on to desktop"? No such instructions were given to export (?) and save it to desktop. What do you mean by "export" anyway? Explain using SAS terminology, describing the steps with their SAS names.

--
Paige Miller
Ahsan
Calcite | Level 5
some end user's doesn't have the access to the server where the file is located that's why after I got the results in html format I export the file using export function in SAS enterprise guide so they can see the graph without installing sasgraph.exe the problem is when I send the link to the client it prompted to install sasgraph.exe not all the user have SAS I just want to send the file where they don't need to install any SAS utility to view the graph. Please help
DanH_sas
SAS Super FREQ

It appears you have generated your output using the ActiveX control. To get the same appearance of the graph that you can send to someone without the control, change the device from ACTIVEX to ACTXIMG (ActiveX image). The output will contain a PNG image that can be viewed by anyone.

 

Hope this helps!

Dan

Ahsan
Calcite | Level 5
how do we change that
ChrisHemedinger
Community Manager

I'd go ahead and change your SAS Enterprise Guide preferences to use PNG.  Find it in Tools->Options->Results->Graph, Graph Format.  See how in this post:

 

https://blogs.sas.com/content/sasdummy/2011/05/25/sas-enterprise-guide-options-my-favorite-5/

 

Scroll to "Change Graph Format to PNG"

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 23 replies
  • 1424 views
  • 0 likes
  • 6 in conversation