请选择 进入手机版 | 继续访问电脑版
楼主: sabin
1259 4

%DS2TREE输出的HTM文件无法显示,求解决! [推广有奖]

  • 4关注
  • 2粉丝

硕士生

53%

还不是VIP/贵宾

-

威望
0
论坛币
1760 个
通用积分
0
学术水平
4 点
热心指数
11 点
信用等级
4 点
经验
188 点
帖子
217
精华
0
在线时间
112 小时
注册时间
2005-5-14
最后登录
2024-3-22

sabin 发表于 2017-1-26 16:40:56 |显示全部楼层 |坛友微信交流群
20论坛币
使用%DS2TREE命令,运行如下程序,希望获得网络图,但是打开输出的htm文件后如下所示——
question.png

程序如下,是摘抄的网上的示例——
/* 1. Define the name and storage location of the HTML output file */
/*    and the location of the jar files.                            */
%let htmlfile = "d:\temp.htm";
%let jarfiles = "D:\Program Files\SASHome\SASGraphJavaApplets\9.4";

/* 2. Define a data set that contains parent-child relationships. */
data myorg;
input name $ empno mgrno deptname $22. deptcode $;
cards;
Peter      2620   1420   Documentation            DOC
Linda      6915   1420   Research & Development   R&D
Maria      1320   1420   Legal                    LGL
Vince      1420   1750   Executive                EXE
Jim        6710   6915   Quality Assurance        QA
Nancy     22560   6915   Quality Assurance        QA
Patrick   28470   6915   Quality Assurance        QA
Elsa      33075   6915   Development              DEV
Clement   22010   6915   Development              DEV
Murielle   3020   6915   Development              DEV
David     11610   6915   Research                 RES
;
run;  

/* 3. Specify titles and footnotes: (optional). */
title1 'Organizational Chart';
footnote1 'To display the department name, place the cursor over a node.';
footnote2 'To rotate the chart, click and drag a node.';

/* 4. Run the DS2TREE macro. */
/* You must change the CODEBASE= argument (using either http://      */
/* or a directory path such as C:/) to specify the location of your  */
/* sas.graph.treeview.jar file and its associated jar files          */
/* (sas.graph.nld.jar, sas.graph.j2d.jar). See the CODEBASE= argument in:   */
/* Programming with the DS2TREE Macro for the Treeview Applet.*/
/* (Make sure that ods listing is open when running macro.) */
ods listing;
%ds2tree(ndata=myorg,         /* data sets and files */
         codebase=&jarfiles,
         xmltype=inline,
         htmlfile=&htmlfile,
         nid=empno,           /* roles of variables */
         nparent=mgrno,
         ntip=deptname,
         nlabel=name,
         height=500,          /* appearance */
         width=600,
         tcolor=navy,
         fcolor=black);

关键词:Tree m文件 htm Organization relationship storage files Peter 网络图 程序
sabin 发表于 2017-1-26 16:43:34 |显示全部楼层 |坛友微信交流群
我晕,图片无法显示

使用道具

sabin 发表于 2017-2-2 20:19:49 来自手机 |显示全部楼层 |坛友微信交流群
sabin 发表于 2017-1-26 16:40
使用%DS2TREE命令,运行如下程序,希望获得网络图,但是打开输出的htm文件后如下所示——

程序如下,是摘 ...
没人回答?我顶

使用道具

sabin 发表于 2017-3-17 09:51:15 |显示全部楼层 |坛友微信交流群
再顶

使用道具

prince315 在职认证  发表于 2017-3-17 12:01:17 |显示全部楼层 |坛友微信交流群
sabin 发表于 2017-3-17 09:51
再顶
一个是定义的路径哪里,一般是不需要引号的吧;另一个就是文件的读取,你写成这样肯定是读入不正确的。

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-3-29 04:18