Hi,
I am trying to use proc report to generate a report with many columns, it is not possible to fit all the columns in one page, is it possible to make the rest of the columns on the following page?
here is the code I am using, what I got is several columns on the first pages, after all the content of these columns showed, then continue to other columns
proc report data=final headline headskip spacing=2 split='|' missing formchar(2)='_' nowd style(report)={width=100%}; column (_fstcol subjid diagdtc PCANSTG tnm PTUMTYP PTUMLOC METFL metloc metadtc _tp53 _mdm2 _cdk _atmatr _fgfr _MICROS _IHC _tmb _STK11); define _fstcol /"Phase/|Dose Level|or Cohort[a]" display left &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.7in asis=on just=left]; define subjid /"Pt. No." display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.3in asis=on just=left]; define diagdtc /"Date of|Initial|Diagnosis" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.6in asis=on just=left]; define PCANSTG /"Stage|at|Diagnosis" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.4in asis=on just=left]; define tnm /"T/N/M|Classification|/TNM Staging" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.5in asis=on just=left]; define PTUMTYP /"Primary|Tumor|Type" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.5in asis=on just=left]; define PTUMLOC /"Primary|Tumor|Site" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.5in asis=on just=left]; define METFL /"Any|Metastases" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.5in asis=on just=left]; define metloc /"Site of|Metastatic|Disease" display center &line. style(header)=[just=left asis=on] flow style(column)=[cellwidth=0.5in asis=on just=left]; define metadtc /"Date|Metastases|Identified" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.5in asis=on just=left]; define _tp53 /"TP53/Method" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.5in asis=on just=left]; define _mdm2 /"MDM2/Method" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.5in asis=on just=left]; define _cdk /"CDK4/6/Method" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.5in asis=on just=left]; define _atmatr /"ATM/ATR/Method" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.5in asis=on just=left]; define _fgfr /"FGFR/Method" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.5in asis=on just=left]; define _MICROS /"Microsatelites Status/Method" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.5in asis=on just=left]; define _IHC /"IHC Store|Method" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.5in asis=on just=left]; define _tmb /"TMB/Result/Method/NGS panel" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.5in asis=on just=left]; define _STK11 /"STK-11/Method" display center &line. style(header)=[just=left asis=on] style(column)=[cellwidth=0.5in asis=on just=left]; compute before _page_ ; line "@R/RTF'\fs0\brdrb\brdrs\brdrw30\cf1 "; endcomp; run;
Many thanks for your help in advance
By the raw codes in your compute before block I have to assume that you are writing to ODS RTF, correct?
Are you restricted to making a file that fits on a specific type of paper? If this is only to be an online document you can change the paper size before creating the output so rows fit on one line of output.
If you must fit this to a specific paper size you might consider including at least one group variable so that broken column order has some chance of being read correctly. Otherwise it is going to be extremely difficult to read and align multiple pages to read correctly.
By the raw codes in your compute before block I have to assume that you are writing to ODS RTF, correct?
Are you restricted to making a file that fits on a specific type of paper? If this is only to be an online document you can change the paper size before creating the output so rows fit on one line of output.
If you must fit this to a specific paper size you might consider including at least one group variable so that broken column order has some chance of being read correctly. Otherwise it is going to be extremely difficult to read and align multiple pages to read correctly.
If all columns won't find on a single page, even when page format is landscape, then usefulness and readability of the table need to be discussed. Unfortunately the argument "it has always been like this" almost always beats common sense.
I haven't found any option to trigger a page break after some variables have been written to the output destination.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.