首页 > 解决方案 > 列的 SAS Proc Report 分页符

问题描述

我希望有人能够帮助我解决这个问题。我正在尝试使用带有 proc 的报告进行报告ods pdf。问题是当我使用该page选项来在新页面上显示右侧的列时,它们出现在同一页面左侧列的正下方,而不是新页面上。这是一个示例代码:

filename _pdf_ "&path.\_&sysdate9..pdf";
 ods pdf file=_pdf_ newfile=none startpage=no style=styles.Profile pdftoc=1 bookmarkgen/*notoc*//*Defined in Step 1 above*/;
ods pdf startpage=now;

proc report data=sashelp.cars(obs=10);
  column make model type origin drivetrain msrp invoice enginesize;
  define make/display style(column)=[width=4cm asis=on just=l] style(hdr)=[asis=on just=l];
    define model /display style(column)=[width=4cm asis=on just=l] style(hdr)=[asis=on just=l];
    define type / display style(column)=[width=8cm asis=on just=l] style(hdr)=[asis=on just=l];
    define origin / display style(column)=[width=5cm asis=on just=c] style(hdr)=[asis=on just=l];
    define drivetrain/display page style(column)=[width=4cm asis=on just=l] style(hdr)=[asis=on just=l];
    define msrp /display style(column)=[width=4cm asis=on just=l] style(hdr)=[asis=on just=l];
    define invoice / display style(column)=[width=8cm asis=on just=l] style(hdr)=[asis=on just=l];
    define enginesize / display style(column)=[width=5cm asis=on just=c] style(hdr)=[asis=on just=l];
 run;

ods pdf close;

我的输出是:在此处输入图像描述

这个想法是在新页面上显示传动系统、msrp、发票和发动机尺寸。我正在使用 SAS 9.4。我已经阅读了文档,以防我错过了一些选项,但似乎无法弄清楚。将不胜感激任何帮助。

标签: sassas-odsproc-report

解决方案


几件事:

  1. 将 startpage=no 更新为 yes
  2. 调整类型、原点、发票、引擎大小变量的宽度。我将其设置为 4 并且运行良好

推荐阅读