The SAS Output Delivery System and reporting techniques

Proc Report formatting

Reply
Occasional Contributor
Posts: 10

Proc Report formatting

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?

 

 

Super User
Posts: 11,101

Re: Proc Report formatting

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.

Occasional Contributor
Posts: 10

Re: Proc Report formatting

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.

Super User
Posts: 11,101

Re: Proc Report formatting

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.

Ask a Question
Discussion stats
  • 3 replies
  • 682 views
  • 0 likes
  • 2 in conversation