Help using Base SAS procedures

proc report - how to split report that starts with fixed columns

Reply
Frequent Contributor
Posts: 129

proc report - how to split report that starts with fixed columns

Hi,

I have a report (like a pivot table) using proc report function that has country names going vertically and days going across @ the top and volumes between them... something like this

Country     Day1     Day2

Canada     300          20

USA            20          10

when I increase the number of column, reports get splits... something like this

Country     Day1     Day2      Day3

Canada     300          20          5

USA            20          10          4

Day4     Day5

20          3

90          100

which makes it difficult to identify which row is for which country... Is there a way to split the report that starts with fixed column... something like this

Country     Day1     Day2      Day3

Canada     300          20          5

USA            20          10          4

Country      Day4     Day5

Canada      20          3

USA          90          100    

Thanks

SAS Super FREQ
Posts: 8,743

Re: proc report - how to split report that starts with fixed columns

Hi:

  The Days and Volume questions seems to have been asked and answered in this previous series of forum postings based on your earlier question:

https://communities.sas.com/message/154885#154885

  Like the other posting, it looks like the DAY variable is an ACROSS item (not a function). ACROSS is a DEFINE statement usage option. The country variable is going down the rows in the other report based on using GROUP as a DEFINE statement usage option. As I explained in the previous posting:

1) it would be more useful to see your data or a SAMPLE of your data

2) it would be useful to see the code that you have already tried

3) it would also be useful, when you show your code, to show your ODS destination. Why? Because, your destination of interest is immediately relevant to your wrapping question. Since you showed STYLE= overrides in the previous posting, it seems likely that you are using ODS RTF or PDF or HTML. ,An HTML page can be as wide as it needs to be, but RTF and PDF output is limited to physical page sizes. So, for your wrapping question, it seems likely that your destination is either RTF or PDF. This would be good information to have verified. You should not be experiencing wrapping in HTML tables. Options for dealing with wide tables with RTF and PDF destinations (I thought you only had 10 days) are to change the orientation to landscape, change the margin settings and/or change the font size, and cellpadding. All of these changes are outlined in an earlier post:

https://communities.sas.com/message/414#414

  When you ask whether there is an option that PROC REPORT can use to identify the "wrapped" columns, did you check the PROC REPORT documentation? The ID option on a DEFINE statement works as you describe. Here's the documentation link:

Base SAS(R) 9.3 Procedures Guide, Second Edition

cynthia

Ask a Question
Discussion stats
  • 1 reply
  • 127 views
  • 0 likes
  • 2 in conversation