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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 1550 views
  • 0 likes
  • 2 in conversation