DATA Step, Macro, Functions and more

How to join two reports into one based on a variable

Reply
Senior User
Posts: 1

How to join two reports into one based on a variable

[ Edited ]

Hi everyone!

I have a doubt.

I would like to join two reports. Both reports are tables and have a page break by the same variable.

For example:

Report 1

Store A

Name Age Sex

aaaaa 22 F

bbbbb 23 M

------------------------

Store B

Name Age Sex

ccccc 30  F

ddddd 32 M

----------------------------

Report 2

Store A

Code Observations

fffffff   123456

--------------------------------

Store B

Code Observations

eeeee   789

------------------------------------

I want to creat a unique report that contains the information about that store, like this:

Store A

Name Age Sex

aaaaa 22 F

bbbbb 23 M

Code Observations

fffffff   123456

---------------

Store B

Name Age Sex

ccccc 30  F

ddddd 32 M

code Observations

eeeee   789

If you can help me...Thanks

PROC Star
Posts: 288

Re: How to join two reports into one based on a variable

You really need to provide an example of the data used to generate the current reports and possibly the code. What you show below looks like output, but from what is unclear. There's probably a number of ways to do what you want, but they'll depend greatly on what your data look like. 

Super User
Posts: 10,500

Re: How to join two reports into one based on a variable

SAS generally manipulates data sets and reports are output. So do you mean the "reports" are the results of one of the SAS report procedures such as Proc Print, Report, Tabulate or are those values acutally in data sets that you want ot combine and provide a report from the combined data?

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