楼主: aohchang
5142 4

SAS proc report 把灰色空白行变成白色,加上直线 [推广有奖]

  • 0关注
  • 0粉丝

已卖:13份资源

高中生

10%

还不是VIP/贵宾

-

威望
0
论坛币
63 个
通用积分
0.0600
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
330 点
帖子
15
精华
0
在线时间
16 小时
注册时间
2012-1-7
最后登录
2023-8-13

楼主
aohchang 发表于 2013-1-2 16:00:39 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

请教各位大师啊!!!

我想要的是这样的图:

Sex

Height

Weight


F

60.588889

90.111111



M

63.91

108.95

就是每个组别(sex)下有横线,而且带有一个空白行。


但是我却只能得到这样的图;

Sex

Height

Weight


F

60.588889

90.111111



M

63.91

108.95


这是我的程序;

proc template;
define style Styles.Threelines;
parent = Styles.Default;
/*title*/
style SystemTitle /
FONT_FACE = " Times New Roman, Comic Sans MS, Helvetica, sans-serif"
/*work style(font)ziti   These are the 3 choices of font being requested, in order of preference.*/
FONT_SIZE = 5
/* work size*/
FONT_WEIGHT = bold
FONT_STYLE = roman
/*FONT_STYLE = italic,italic is not upright word*/
FOREGROUND = midnightblue
/*word color*/
BACKGROUND = white;
/* back color*/
/*footnote*/
STYLE SystemFooter /
FONT_FACE = " Times New Roman, Comic Sans MS, Helvetica, sans-serif"
FONT_SIZE = 2
FONT_WEIGHT = bold
FONT_STYLE = italic
FOREGROUND = black
BACKGROUND = white;
/*column header*/
STYLE Header /
FONT_FACE = "Times New Roman, Helvetica, sans-serif"
FONT_SIZE = 4
FONT_WEIGHT = medium
FONT_STYLE = roman
FOREGROUND = black
BACKGROUND = white;
STYLE RowHeader from header /
BACKGROUND = white;
/*TABLE CELLS*/
STYLE Data /
FONT_FACE = "Times New Roman, Helvetica, sans-serif"
FONT_SIZE = 2
FONT_WEIGHT = medium
FONT_STYLE = roman
FOREGROUND = black
BACKGROUND = white;
/*lines around and inside the table,,called borders and rules*/
STYLE Table /
FOREGROUND = black
BACKGROUND = white
CELLSPACING = 0
CELLPADDING = 3
FRAME = HSIDES/*controls the border that runs around the outside of the table.*/
RULES = groups;/*controls rules and borders */
STYLE Body /
FONT_FACE = "Times New Roman, Arial, Helvetica, sans-serif"
FONT_SIZE = 3
FONT_WEIGHT = medium
FONT_STYLE = roman
FOREGROUND = black
BACKGROUND = white;
/*ODS creates a table to hold the title, and a table to hold the footnote. To make the boxes go away*/
STYLE SysTitleAndFooterContainer /
CELLSPACING=0;
end;
run;


ods rtf file="F:\pratise.rtf" style=Threelines;


proc report

data=sashelp.class nowd;

column sex height weight;

define

sex/group;

define height/analysis n mean;

define weight/analysis n

mean;

compute after sex;

line "";

endcomp;

run;

ods rtf close;


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:proc report Report repor repo Port requested report parent

沙发
aohchang 发表于 2013-1-2 16:07:02
不好意思,图上传的有点问题
一下为正确的图:

未命名1.jpg (8.8 KB)

程序出来的图

程序出来的图

未命名.jpg (7.66 KB)

想要的图

想要的图

藤椅
ttklkl 发表于 2013-1-2 20:45:16
那就不用compute语句,而是将空行写进数据集里。
Stay Hungry. Stay Foolish.

板凳
aohchang 发表于 2013-1-2 21:43:31
ttklkl 发表于 2013-1-2 20:45
那就不用compute语句,而是将空行写进数据集里。
空行怎么写进数据集呢?

报纸
aohchang 发表于 2013-1-2 22:13:01
这样:compute after sex/style={background=white}; line "" ;
endcomp;
可以把空白行底色变白
已有 1 人评分经验 收起 理由
eijuhz + 40 精彩帖子

总评分: 经验 + 40   查看全部评分

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 12:33