简体   繁体   English

下一页续表

[英]Continuing Long Table on Following Page

I ran into this problem using proc report and ods rtf. 我使用proc report和ods rtf遇到了这个问题。 I want to create a listing with a lot of columns which don't fit on one page. 我想创建一个列表,其中包含许多列,这些列不适合一页。 The problem is that the second part of columns don't print immediately on the following page but it prints after the whole first part of listing is printed. 问题是列的第二部分不会在下一页上立即打印,而是在列表的第一部分全部打印后才打印。 So I don't have it on a second page as I would like to but for example on page 15 which makes it look very chaotic. 因此,我没有在第二页上显示它,而是例如在第15页上,这使它看起来非常混乱。

Is there some way how to change it? 有什么办法可以改变它吗? I don't know if it is a proc report problem or ods rtf problem. 我不知道这是proc报告问题还是ods rtf问题。

Thank you in advance for your help. 预先感谢您的帮助。

Try inserting a page break: 尝试插入分页符:

data test0;
  array vars{20} $;
  do i = 1 to 100;
    do j = 1 to 20;
      vars{j} = put(rand('Normal'),8.4);
    end;
    output;
  end;
run;

data test;
  set test0;
  pageno = ceil(_n_/37);
run;

ods rtf file='test.rtf';

proc report data=test headline nowd;
  column pageno vars1 - vars20;
  define pageno / order noprint;
  break after pageno / page;
run;

ods rtf close;

In this example, I have determined that exactly 37 lines of the table fit on a page, so I created pageno which allows me to break the table after 37 lines. 在此示例中,我确定表格的恰好37行适合一个页面,因此我创建了pageno ,它使我可以在37行之后中断表格。 When I use proc report , remember to include pageno in your column statement and define it as an order or group variable. 当我使用proc report ,请记住在您的列语句中包括pageno并将其定义为ordergroup变量。 Using the break statement actually causes the breaks to appear. 实际上,使用break语句会导致出现中断。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM