BookmarkSubscribeRSS Feed
Hernan
Calcite | Level 5

We created a report in PDF format using ODS and PROC PRINT. The data set has two variables, which we want to print as 8 columns, using the columns = 4 in the ODS PDF statement. This has worked fine many times, but we had two reports where the columns were uneven. Normally, the PDF contains 8 columns and 43 rows on each page. In two instances we have had reports that randomly showed 44 rows for some of the pairs of columns on some pages. For example on page 1, columns 1 and 2 might have 44 rows and columns 3 to 8 would have 43 rows, then pages 2 to 50 might all have 8 columns and 43 rows, and then page 51 might have 44 rows on columns 3 and 4 while all other columns have 43 rows. What could be causing the uneven pages, and how can we avoid it?

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:

  You might try the UNIFORM option on the ODS PDF statement to see whether that makes a difference. Have you tested whether the problem seems to happen if the number of obs are evenly divisible by 4 or not?  I would think this is caused by difference in number of obs and how PDF formats each page separately. Does the problem happen with the SAME dataset or was the dataset different from previous datasets when the uneven numbers appeared.

Otherwise, my recommendation would be that you open a track with Tech Support. I don't know the algorithm that PDF uses for COLUMNS=. However, Tech Support can look at ALL your data and ALL your code and they can open a track and involve the developers with the question, if there is some oddity in how it calculates number of obs per column.

cynthia

Hernan
Calcite | Level 5

Thank you. We had used the program with several data sets before. I am not sure why this happened with the latest one. The UNIFORM option did not quite solve the number of rows issue, but it did make the columns in all pages have the same width.

Solution (Work-around)

A colleague added the CELLSPACING option for the STYLE in PROC TEMPLATE, and adjusted its value until each page had 44 rows (except for the last page, of course). That seems to be working, at least for now.

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!

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
  • 2 replies
  • 848 views
  • 0 likes
  • 2 in conversation