The SAS Output Delivery System and reporting techniques

SAS Ver. 9.4 - PROC REPORT COMPUTE AFTER _PAGE_ and IF _BREAK_ THEN DO; issue

Reply
Occasional Contributor
Posts: 13

SAS Ver. 9.4 - PROC REPORT COMPUTE AFTER _PAGE_ and IF _BREAK_ THEN DO; issue

I am using some PROC REPORT code techniques that I borrowed from PROC REPORT By Example by Lisa Fine, pages 247 and 248. I altered the code to COMPUTE AFTER _PAGE_.

 

I am having trouble in the following section of PROC REPORT. The text variables text1 - text4 do not start printing where they should, at the bottom of the page before the footer, until page 6 of a 10 page report.

 

COMPUTE AFTER _PAGE_ / left;

IF _BREAK_ = ' ' THEN

DO;

text1="^{style [font_face=wingdings font_size=12 pt foreground=LIGR]n}"

||"Avg. Charges <= 10th Percentile: " || strip(put(avg_chg10.sum,dollar14.1)) || ", "

||"^{style [font_face=wingdings font_size=12 pt foreground=DAGR]n}"

||"Avg. Charges >= 90th Percentile: " || strip(put(avg_chg90.sum,dollar14.1));

text2="^{style [font_face=wingdings font_size=12 pt foreground=LIGR]n}"

||"Avg. LOS (Days) <= 10th Percentile: " || strip(put(avg_los10.sum,10.1)) || ", "

||"^{style [font_face=wingdings font_size=12 pt foreground=DAGR]n}"

||"Avg. LOS (Days) >= 90th Percentile: " || strip(put(avg_los90.sum,10.1));

text3="^{style [font_face=wingdings font_size=12 pt foreground=LIGR]n}"

||"Avg. Diagnosis <= 10th Percentile: " || strip(put(avg_dx10.sum,10.1)) || ", "

||"^{style [font_face=wingdings font_size=12 pt foreground=DAGR]n}"

||"Avg. Diagnosis <= 90th Percentile: " || strip(put(avg_dx90.sum,10.1));

text4="^{style [font_face=wingdings font_size=12 pt foreground=LIGR]n}"

||"Avg. Procedures <= 10th Percentile: " || strip(put(avg_pr10.sum,10.1)) || ", "

||"^{style [font_face=wingdings font_size=12 pt foreground=DAGR]n}"

||"Avg. Procedures >= 90th Percentile: " || strip(put(avg_pr90.sum,10.1));

 

END;

** Put New Variables in Line Statements;

LINE text1 $300.;

LINE text2 $300.;

LINE text3 $300.;

LINE text4 $300.;

 

ENDCOMP;

 

I am sort of a newbie to advanced SAS version 9.4 PROC REPORT techniques so if anyone can shed some light on why text variables do not show up until the middle of the report, I would be grateful.

Stephen Dybas


PROC REPORT Pg 5.pngPROC REPORT Pg 6.png
Super User
Posts: 10,483

Re: SAS Ver. 9.4 - PROC REPORT COMPUTE AFTER _PAGE_ and IF _BREAK_ THEN DO; issue

Your entire program may be needed to accurately diagnose.

Your ODS destination may have some affect as well.

If you are getting any warnings you might want to post the log with the code and messages.

Ask a Question
Discussion stats
  • 1 reply
  • 294 views
  • 0 likes
  • 2 in conversation