The SAS Output Delivery System and reporting techniques

Combine Two or More Proc Report Outputs into 1 Output

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

Combine Two or More Proc Report Outputs into 1 Output

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

 

combine proc report.PNG


Accepted Solutions
Solution
‎05-01-2018 11:21 PM
SAS Super FREQ
Posts: 9,426

Re: Combine Two or More Proc Report Outputs into 1 Output

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


All Replies
Super User
Posts: 23,998

Re: Combine Two or More Proc Report Outputs into 1 Output

Posted in reply to albertsamaniego
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).
Occasional Contributor
Posts: 6

Re: Combine Two or More Proc Report Outputs into 1 Output

I need to output it as an rtf file.

Super User
Posts: 23,998

Re: Combine Two or More Proc Report Outputs into 1 Output

Posted in reply to albertsamaniego

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.

Solution
‎05-01-2018 11:21 PM
SAS Super FREQ
Posts: 9,426

Re: Combine Two or More Proc Report Outputs into 1 Output

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

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 225 views
  • 0 likes
  • 3 in conversation