SAS中文论坛

 找回密码
 立即注册

扫一扫,访问微社区

查看: 819|回复: 5
打印 上一主题 下一主题

请教ODS输出时title的问题

[复制链接]

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
楼主
 楼主| 发表于 2008-6-24 23:33:04 | 只看该作者

请教ODS输出时title的问题

ODS rtf输出并指定bodytitle时,title与表格之间总是有一个回车行,不知道怎样消除这个回车行?
谢谢。
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
沙发
 楼主| 发表于 2008-6-26 15:30:08 | 只看该作者

Re: 请教ODS输出时title的问题

总觉得bodytitle并不好用,虽然经常做RTF的报表,但十分不喜欢用这个选项,下面是有关bodytitle选项的评述:
The bodytitle option allows the text from the title and footnote statements to be placed in the body of the table. However, as previously mentioned, the bodytitle option does not allow you to use both nodate and nonumber. Because I use the number option, a number is placed in the header in the upper right corner of the output (see Examples 3 at the end of this paper). Notice also that the bodytitle option places the footnote only on the last page of the table. Therefore, you should not use the bodytitle option if you want the footnote to appear on every page of the table. Another problem with bodytitle is that the page numbering prints out as “Page 1 of”. This is because I used the portrait orientation for the table. When landscape orientation is used the bodytitle option can be used with the RTF control strings for page numbering.

如果非得用它的话,我试图找了一下帮助文件,好像没有去掉那个回车行的其他选项,不过可以在SAS中使用WorkBasic语句(如果会VBA的话也可以用VBA替代),虽然麻烦点。具体操作查查相关帮助文件。
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
板凳
 楼主| 发表于 2008-6-27 14:53:58 | 只看该作者

Re: 请教ODS输出时title的问题

谢谢
虽然我也没有找到,但感觉应该有,这点事情也借助vba实在是下策。
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
地板
 楼主| 发表于 2008-6-28 11:13:38 | 只看该作者

Re: 请教ODS输出时title的问题

可以参考proc template自己定义输出格式,我想去掉<br>这一行应该就可以去掉那个空行了。
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
5#
 楼主| 发表于 2008-7-9 11:36:47 | 只看该作者

Re: 请教ODS输出时title的问题

多谢shiyiming。
我找了一下,有<br>,但它是HTML的格式,RTF没用到该标记;
其他地方没有找到设置断行的地方,还是没弄清楚怎么去设置。
继续盼望高人指点,呵呵。
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
6#
 楼主| 发表于 2008-7-9 16:00:51 | 只看该作者

Re: 请教ODS输出时title的问题

来自SAS Forums的解答:
[quote:1k558jx9]
Re: Spaces above and below main body
Posted: Jun 15, 2006 8:32 AM    in response to: SAS_USER_MJC

There is no tagset for RTF in 9.1.3 that you can change. However, this PharmaSUG paper illustrates a technique for inserting RTF control strings into a file to delete the space above the table. I believe that -that- is your issue -- the space that's put above and between tables -- which is unrelated to the space that goes around a title:

<!-- m --><a class="postlink" href="http://www.lexjansen.com/pharmasug/2005/applicationsdevelopment/ad16.pdf">http://www.lexjansen.com/pharmasug/2005 ... t/ad16.pdf</a><!-- m -->

There is good news for SAS 9.2 -- by then, there will be a destination known as &quot;measured RTF&quot; and I believe that under that scenario, there will be a tagset to modify. But, even better, I think he's added a facility to allow you to alter the number of spaces that you see above and/or between tables--without needing to change the tagset. When he gets back he can verify this. The preliminary documentation, however, indicates that there will be a PARSKIP style element that you can change in a style template:

<!-- m --><a class="postlink" href="http://support.sas.com/rnd/base/topics/new92/92measuredrtf.html">http://support.sas.com/rnd/base/topics/ ... edrtf.html</a><!-- m -->

cynthia
[/quote:1k558jx9]

我的办法是读取RTF Code, 然后删掉相应位置的{\par}
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|小黑屋|手机版|Archiver|SAS中文论坛  

GMT+8, 2026-2-4 22:06 , Processed in 0.067174 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表