Hi All!
I have an issue with my page break when using ODS tagsets.rtf.
It leaves a big space between my table and the footer and switch page, even if there is enough room to print more records on the page.
It seems to get worse when I add RTF text string such as Indentation, super script...
My guess is that ODS tagsets.rtf sees more character then what will be print because of the RTF special chars code, and think there is not enough room left.
Somebody has an idea how to fix that?
Gotta say, I have never used tagsets.rtf. What happens when you change it over to:
ods rtf file="....rtf";
Thats what I always use, and not had any issues. Do note, we can't fix anything we can't see, and you haven't provided anything - e.g. code used to produce output, example output etc.
Thanks for your answer
It works with ODS RTF file="..." but I'm afraid I will need other functionality of tagsets.RTF
Here is an example of the code I'm using to produce my report where _page variable is the manual page number I compute.
I get some records where _page=1 that are print on Page 2 even if there is enough room for them on Page 1.
-----------------------------------------------------------------
options orientation=landscape papersize=letter;
options nodate nonumber nobyline;
ods tagsets.rtf file="C:\Test.rtf" style=TMP;
proc report data=data missing split="|"
style(header)=[just=Center]
style(column)=[just=Center];
column (_page var1 var2 var3 var4);
define _page / noprint order order=internal;
define var1 / "&_bborder."
style(column)=[cellwidth=2in];
define var2 / "&_bborder.&_TRT1"
style(column)=[cellwidth=2in];
define var3 / "&_bborder.&_TRT2"
style(column)=[cellwidth=2in];
define var4 / "&_bborder.&_TRT3"
style(column)=[cellwidth=3in];
by _page;
break after _page / page;
run;
ods tagsets.rtf close;
Well, I can only put forth some ideas then:
- This line: define _page / noprint order order=internal; Try order=data.
- Drop the by _page - not sure why you would be by grouping on page, as you already have a break after page, no point using the two together.
Try increasing the width of the cells.
Other things you can do are to change the margins before the RTF step, in your OPTIONS statement. Or, you can reduce the font for the data cells to get more per page. Look at the difference between using 11pt and 8 pt with just 40 obs. At 11pt, the obs take 2 pages. At 8 pt, the obs fit on 1 page.
cynthia
Here's the code:
options orientation=portrait topmargin=.5in
bottommargin=.5in rightmargin=.5in
leftmargin=.5in nodate nonumber;
ods rtf file='c:\temp\font.rtf';
proc report data=sashelp.shoes(obs=40)
style(report)={width=100%}
style(column)={fontsize=11pt}
style(lines)=Header;
compute before _page_;
line 'font=11pt';
endcomp;
run;
proc report data=sashelp.shoes(obs=40)
style(report)={width=100%}
style(column)={fontsize=8pt}
style(lines)=Header;
compute before _page_;
line 'font=8pt';
endcomp;
run;
ods rtf close;
Thanks both of you for your help.
But I need to follow some standard for font size and margin, and my column are already set to optimize the view. Other suggestion have'nt change anything to my layout.
It really is in the tagset definition that the problem come from.
I tried to create my own tagset updating implicit_pagebreak event of the parent tagset following this article:
http://www2.sas.com/proceedings/sugi31/067-31.pdf
It works and the records are now on page 1 as I want, however, I get double column header! So I'm triing to tell the tagset to remove extra column header also.
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 25. 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.