The SAS Output Delivery System and reporting techniques

summary and detail on different pages

Reply
N/A
Posts: 0

summary and detail on different pages

The proc report code below does what I want except when there are too many lines for an entire set with the same value of month_of to fit on one page. If month_of takes more than one page the detail of a run_date sub group prints on one page and the summary prints on the next. I have not had a case where detail is split between pages but I don't know if that is blind luck or an artifact of how proc report works. Is there some way to force the detail and summary values for a value of run_date to be on the same page?


proc report data=typesummary nowindows;
by month_of;
column report_month run_date reporting_type count FAF SLF Total_Cost Expended_Amount;
define run_date / GROUP;
define reporting_type / GROUP;
define count / analysis sum;
define FAFunds / analysis sum;
define SLFunds / analysis sum;
define Total_Cost / analysis sum;
define Expended_Amount / analysis sum;
break after run_date / skip summarize dol dul;
run;
SAS Super FREQ
Posts: 8,743

Re: summary and detail on different pages

Hi:
I'm confused. You show a BY statement for the variable MONTH_OF, but then you have REPORT_MONTH in the COLUMN statement with no usage or DEFINE statement. Are MONTH_OF and REPORT_MONTH the same variable???

cynthia
N/A
Posts: 0

Re: summary and detail on different pages

Sorry I should have explained. month_of and report_month are not the same. There are multiple runs in a month and sometimes the final run is made a few days after the month ends.

Report_month just identifies which run is the one with final figures for the month. It is missing for all other runs for that month.

Month_of is the month and year from run_date for observations that are not the final run. Month_of is the month and year from report_month for final runs.

report_month without a define or other usage statement appears to be treated like an ID statement. It is incorporated into the report but only to label the final run of the month as such.
New Contributor
Posts: 4

Re: summary and detail on different pages

Since your report is dependent on when the update is occurring, it might be simpler to generate 2 reports or use PROC SQL to create summary and detailed reports.
Ask a Question
Discussion stats
  • 3 replies
  • 133 views
  • 0 likes
  • 3 in conversation