I have a task to create a pdf report. I have the report generating but I have some table headings on the last line of one page and the data on the next page.
Is there a way to check how many lines are left on a page and if it's not enough add a new page at that point?
Thank you
It may help to show the code you use to generate the report including any options on the ODS PDF statement and system options like papersize, orientation and such.
The basic answer to "knowing rows" is "not likely to happen".
Reasons: Font size affects amount of space used for each "row" of output. The amount of cellpadding top and bottom affects size of each row.
Paper size affects the amount of space available.
Options in styles or code for Titles, Footnotes affect the amount of space each takes. If one of the wraps due to page width then another complication.
The way you create a report may allow you to control where pages break nicer but there isn't going to be any simple magic bullet.
It may help to show the code you use to generate the report including any options on the ODS PDF statement and system options like papersize, orientation and such.
The basic answer to "knowing rows" is "not likely to happen".
Reasons: Font size affects amount of space used for each "row" of output. The amount of cellpadding top and bottom affects size of each row.
Paper size affects the amount of space available.
Options in styles or code for Titles, Footnotes affect the amount of space each takes. If one of the wraps due to page width then another complication.
The way you create a report may allow you to control where pages break nicer but there isn't going to be any simple magic bullet.
Hi @jerry898969 and @ballardw ,
I really appreciate jerry898969's question and ballardw's effort to solve the problems. Like in ballardw's response the current implementation of RTF in PROC REPORT would not solve these problems. So, it's a matter of a different implementation of RTF that could potentially solve the problems. Attached is an example of such an implementation, it was created as an RTF file and it's saved as a Word document. See it for yourselves. There is no page break in this file. The Microsoft Word/RTF handles pagination very well, and you will never count lines on a page.
Jianmin Long
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.