The SAS Output Delivery System and reporting techniques

How to control the header margin and footer margin in rtf with template?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

How to control the header margin and footer margin in rtf with template?

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;


Accepted Solutions
Solution
‎09-01-2011 10:54 AM
SAS Super FREQ
Posts: 8,742

How to control the header margin and footer margin in rtf with template?

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

View solution in original post


All Replies
Occasional Contributor
Posts: 15

How to control the header margin and footer margin in rtf with template?

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';

Solution
‎09-01-2011 10:54 AM
SAS Super FREQ
Posts: 8,742

How to control the header margin and footer margin in rtf with template?

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

Occasional Contributor
Posts: 15

How to control the header margin and footer margin in rtf with template?

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.

Contributor
Posts: 22

Re: How to control the header margin and footer margin in rtf with template?

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;
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 1044 views
  • 0 likes
  • 3 in conversation