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?
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
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: