BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
albertsamaniego
Fluorite | Level 6

How do I combine two or more proc report outputs with different column names into 1 single table?

 

combine proc report.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi,

As @Reeza pointed out, without seeing your code, it is hard to speculate. However, with PROC REPORT, you only have 2 options for producing your reports -- with COMPUTE BEFORE a break variable or COMPUTE BEFORE _PAGE_ with BY group processing. The headers will repeat with BY groups. I think #2 report comes closer to what you showed (using SASHELP.SHOES, sorted by REGION):

rtf_compute_page_by.png

The #1 report used COMPUTE BEFORE REGION and that does not repeat the spanning headers or the column headers, as you can see in #1.

 

cynthia

View solution in original post

4 REPLIES 4
Reeza
Super User
Depends on how you created the output in the first place....what is the code you're using and what output format/destination (PDF, RTF, Excel).
albertsamaniego
Fluorite | Level 6

I need to output it as an rtf file.

Reeza
Super User

Depends on how you created the output in the first place....what is the code you're using and what output format/destination (PDF, RTF, Excel).

 


@albertsamaniego wrote:

I need to output it as an rtf file.


 

That's an answer to part of it....You can probably use PROC REPORT with BY statements and BREAKS to create this type of report. 

Note that I'm moving your question to the Reporting forum.

Cynthia_sas
SAS Super FREQ

Hi,

As @Reeza pointed out, without seeing your code, it is hard to speculate. However, with PROC REPORT, you only have 2 options for producing your reports -- with COMPUTE BEFORE a break variable or COMPUTE BEFORE _PAGE_ with BY group processing. The headers will repeat with BY groups. I think #2 report comes closer to what you showed (using SASHELP.SHOES, sorted by REGION):

rtf_compute_page_by.png

The #1 report used COMPUTE BEFORE REGION and that does not repeat the spanning headers or the column headers, as you can see in #1.

 

cynthia

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