BookmarkSubscribeRSS Feed
ljaeger
Fluorite | Level 6

Is there a way to split a line in Proc Report?  I'd like to have the bulk of the columns on a single line, then a linebreak and the final two columns print underneath.  Attached is an example of how I'd like the report to look.  I've tried using panels (with traditional output) to no avail.  Thoughts?

 

 

3 REPLIES 3
ballardw
Super User

I can't tell from the posted example what "final two columns" may mean. That looks like there might be break to insert a heading part way down a column.

ljaeger
Fluorite | Level 6

The two columns that are inset below the main column, headed "CPT" and "# Provided" represent the last two fields of each record.

What you see is an Excel spreadsheet that I mocked up to show what I wanted to display using proc report.

 

I tried to use a break command and then test the CPT description (cpt_description ne '') to tell the program to write the last tweo columns using a line statment, but that didn't work.  Or I did it wrong.

ballardw
Super User

Two variables in the same column aren't like to work within proc report. Is the 'report' supposed to count or summarize a variable to the the "# provided" value?

 

Depending on your data structure I think it might be possible to get something like this using proc tabulate as it treats nesting differently. But the summary values would have to come from the same function (n or sum) and getting a label like "# provided" in a summary column takes a bit of extra work.

And a pretty complete description of the input data would be needed.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1907 views
  • 0 likes
  • 2 in conversation