BookmarkSubscribeRSS Feed
tparvaiz
Obsidian | Level 7

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

1 REPLY 1
Cynthia_sas
SAS Super FREQ

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 546 views
  • 0 likes
  • 2 in conversation