在过程报告中强制分页
我正在 SAS 中使用 ODS PDF
语句内的 PROC REPORT
创建一个 2 列报告。
我的代码看起来像这样:
ods pdf file='/file/here.pdf' columns=2;
ods pagestart=now;
proc report data=rpt\_data nowd missing contents='';
columns a b c;
by a;
define a /group order=internal;
define b /display;
define c /display;
break after a /page;
run;
这似乎只是“中断”到页面上的下一个列,而不是像我希望的那样实际的新页面。
有什么建议吗?
运行此代码将产生我正在询问的问题。
%let file1='/file/directory/test.pdf';
ods pdf file=&file1. columns=2;
ods pdf startpage=now;
proc sort data=sashelp.class out=temp;
by age;
run;
proc report data=temp nowd missing contents='';
columns age name sex;
by age;
define age /group order=internal;
define name /display;
define sex /display;
break after age /page;
run;
ods \_all\_ close;
I'm creating a 2-column report in SAS using PROC REPORT
inside the ODS PDF
statement.
My code looks something like this:
ods pdf file='/file/here.pdf' columns=2;
ods pagestart=now;
proc report data=rpt\_data nowd missing contents='';
columns a b c;
by a;
define a /group order=internal;
define b /display;
define c /display;
break after a /page;
run;
This only seems to "break" to the next column on the page, rather than an actual new page like I would like it to.
Any suggestions?
Running this code will produce the issue I'm inquiring about.
%let file1='/file/directory/test.pdf';
ods pdf file=&file1. columns=2;
ods pdf startpage=now;
proc sort data=sashelp.class out=temp;
by age;
run;
proc report data=temp nowd missing contents='';
columns age name sex;
by age;
define age /group order=internal;
define name /display;
define sex /display;
break after age /page;
run;
ods \_all\_ close;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,从 9.2 开始,这对于 ods pdf 目标尚是不可能的。也就是说,没有非常难看的黑客行为,例如将幽灵行添加到短按组中并使用背景颜色对它们进行着色,以便它们在纸上不可见,等等。 SAS 的技术支持响应迅速。不过,在放弃之前我会打电话/发电子邮件给他们。希望这会有所帮助。
As far as I know, this is not yet possible for the ods pdf destination as of 9.2. That is, without very ugly hacks like adding ghost rows to the short by-group and coloring them with the background color so that they are invisible on paper, and so on. SAS's technical support is quite responsive. I would call/email them before I give up, though. Hope this helps a bit.
这对于您的情况可能不实用,但以防万一:如果您使用 ODS“测量的 RTF”目的地;然后你可以将 RTF 文件转换为 pdf...
This might not be practical in your case, but just in case: You can set page breaks if you use the ODS "Measured RTF" destination ; then you could convert your RTF file to a pdf...