Hello,
I am trying to create a descriptive table in proc report, but my table spans across 3 pages. On the 2nd and 3rd pages, the column headers repeat and I would like to remove them. Is this possible?
Here is my code:
ods escapechar = "~";
option nodate nonumber orientation=landscape;
ods rtf file="/home/eden/edencod/RESULTS/FINAL/IPW.rtf";
proc report data=ipwfreq2 split='|'
style(report) = {cellpadding=1.25pt cellspacing=0pt frame=hsides rules=groups}
style(header) = {background=white};
columns varname category Underweight___18_5kg_m2_ Normal__18_5_25kg_m2_ Overweight__25_30kg_m2_ Obese____30kg_m2_ p_value;
define varname/ "Variable" width=4 group order=data;
define category/" " width=6;
define Underweight___18_5kg_m2_/ "Underweight (<18.5/kgm²)" center;
define Normal__18_5_25kg_m2_/ "Normal (18.5-25/kgm²)" center;
define Overweight__25_30kg_m2_/ "Overweight (25-30kg/m²)" center;
define Obese____30kg_m2_/ "Obese (>=30kg/m²)" width=5 center;
define p_value/"P-value" center; run;
ods rtf close;
Thank you in advance for your help
@Cynthia_sas Any comment on this?
Hi:
Yes @ChrisNZ -- without data it is impossible to test or tweak the code. As a side note the use of width= will be ignored by ODS RTF since that is a LISTING only option.
The old trick of 2 proc steps may work, if I understand correctly what is desired -- it's what you had to do when you wanted a different title starting on page 2 of a report. In this case, the title can be the same (or not) but the first PROC REPORT can have headers and the second one uses the NOHEADERS option and starts where the first one leaves off, as shown here with a subset from SASHELP.CARS -- you can see the change between page 1 and page 2 below:
Cynthia
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.