The SAS Output Delivery System and reporting techniques

Only printing the headers on the first page (PROC REPORT)

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

Only printing the headers on the first page (PROC REPORT)

[ Edited ]

Hi SAS Experts,

I am creating a base SAS report using PROC REPORT and the destination is ODS PDF. My report is long and is having multiple pages. SAS prints the headers specified in the COLUMN statement on the top of every page. Is there an option to print the headers only on the first page?

Thank you for your helps! 


Accepted Solutions
Solution
‎02-26-2018 02:46 PM
SAS Super FREQ
Posts: 9,431

Re: Only printing the headers on the first page (PROC REPORT)

Hi:
  No, there is not a specific option to do what you want for an entire report. But, there is a NOHEADER option. The challenge with NOHEADER is that it applies to all the pages on the report. So what you can do is this: you could print the first page with headers and then print all the rest of the pages without headers using the NOHEADER option of PROC REPORT. So the basic model would be:


proc report data=xxxx(firstobs=1  obs=50);
run;
 
proc report data=xxxx(firstobs=51) noheader;
run;



You may have to adjust the obs=value on the first PROC REPORT to make sure that the number of obs plus your titles and footnotes, all fits on the first page.

cynthia

View solution in original post


All Replies
Solution
‎02-26-2018 02:46 PM
SAS Super FREQ
Posts: 9,431

Re: Only printing the headers on the first page (PROC REPORT)

Hi:
  No, there is not a specific option to do what you want for an entire report. But, there is a NOHEADER option. The challenge with NOHEADER is that it applies to all the pages on the report. So what you can do is this: you could print the first page with headers and then print all the rest of the pages without headers using the NOHEADER option of PROC REPORT. So the basic model would be:


proc report data=xxxx(firstobs=1  obs=50);
run;
 
proc report data=xxxx(firstobs=51) noheader;
run;



You may have to adjust the obs=value on the first PROC REPORT to make sure that the number of obs plus your titles and footnotes, all fits on the first page.

cynthia

Occasional Contributor
Posts: 8

Re: Only printing the headers on the first page (PROC REPORT)

Posted in reply to Cynthia_sas
Got it. Thank you very much for response and the alternative solution Cynthia! Smiley Happy
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 231 views
  • 1 like
  • 2 in conversation