BookmarkSubscribeRSS Feed
c_wenger
Calcite | Level 5

I am creating a program that generates ods pdf and rtf outputs of proc report tables for different datasets that might be passed in. My system for table wrapping works well if each row has one or two lines of text in it-- I have pageno in my column statement of the proc report so there are only 13 rows on each page, allowing wide tables to wrap immediately following the first half of the table.

		data work.&dataset;
			set lib.&dataset;
			pageno = ceil(_n_/13);
		run;

But when the data needs to be wrapped into 3+ lines, it messes up the tables and how they are shown on the pages. Is there a way to fix the number of lines text can wrap to?

 

I would rather have wider columns and tables than have text wrap to three lines so that my observations are clearly listed together when the table wraps, but I need the column width to be dynamic so it is set automatically by SAS (ie I don't want to make the user set the column width to fix the way the table is presented).

 

Is there a way to do this?

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  Without data and your PROC REPORT code, there's no way to test anything. In general, you need to control the column width when generating your PROC REPORT code, it doesn't happen dynamically.  Just as you're controlling the page size with your pageno variable, you'll have to figure out a way to set the optimum column width that will work for most of your scenarios. This user group paper https://support.sas.com/resources/papers/proceedings14/SAS038-2014.pdf had a discussion of sizing your output, the discussion focused mainly on PDF vs HTML, but the PDF discussion does also relate to RTF and there were some examples of wrapping.

Cynthia

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 421 views
  • 0 likes
  • 2 in conversation