Hi,
We know that the body style can control the top,bottom,left and right margin in rtf. But how SAS controls the header margin and footer margin in rtf with template?
This is an element to control the top,bottom,left and right margin.
proc template;
define style test;
style Body from Document /
marginbottom = 2.5cm
margintop = 2.5cm
marginright = 2.5cm
marginleft = 2.5cm;
end;
run;
Hi:
I believe that ODS RTF and ODS TAGSETS.RTF both have support for HEADERY and FOOTERY, as described in this Tech Support note:
http://support.sas.com/kb/24/168.html
I am not sure whether you can set HEADERY and FOOTERY in a style template. That would be a question for Tech Support.
cynthia
Hi,
I solved it just now. For example, I want the header margin is 1.5cm and footer margin is 1.75cm. Then using the following code.
ods RTF sectiondata='\headery850\footery990';
Hi:
I believe that ODS RTF and ODS TAGSETS.RTF both have support for HEADERY and FOOTERY, as described in this Tech Support note:
http://support.sas.com/kb/24/168.html
I am not sure whether you can set HEADERY and FOOTERY in a style template. That would be a question for Tech Support.
cynthia
Hi:
Cynthia, I also use the ODS RTF HEADERY and FOOTERY to solve my problem. And maybe there's really no solution in a style template. Thanks.
Cynthia,
I have found that the ODS RTF statments necessary to do this work "as advertised", but the same can NOT be said for the comparable statements for the ODS TAGSETS.RTF destination: in a Tech Support Track that I submitted (December 2010) regarding the headery and footery section data "command" in the ODS TAGSETS.RTF it was finally determined that there was a problem with that tagset (in Version 9.2), in that the resulting RTF file had the correct Section Data string in it to set the header and footer margin ... followed immediately by a re-setting of the headery and footery to equal the top and bottom margin. The final reply to that support track was that the support person was going to discuss the problem with development and "... expect ... to modify the tagset to change this behavior" ... and it appears to have NOT yet been fixed in Version 9.3.
FYI---Here's the snippet of the "offending" tagset code (from the 9.3 TAGSETS.RTF) --- wherein you can see that the section data is put in the RTF output file, which would include the headery footery values one might have issued in the SAS ODS statement (e.g., ods tagsets.RTF options(SECT='\headery720\footery576') --- then the headery and footery is re-set afterwards to the top/bottom margins.
put $sect_data;
put NL;
put "\headery" TOPMARGIN "\footery" BOTTOMMARGIN;SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.