BookmarkSubscribeRSS Feed
nohassles
Obsidian | Level 7

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
1 REPLY 1
ballardw
Super User

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 930 views
  • 0 likes
  • 2 in conversation