BookmarkSubscribeRSS Feed
Rajaram
Obsidian | Level 7

When i use ods tagsets.rtf, currently titles and footnotes are repeating each page but i want titles in first page and footnotes in last page also i want bottom of solid line each page. Is it possible?

i use following code

ods tagsets.rtf file='test.rtf' style=docstyls

options(CONTINUE_TAG ='OFF' TROWHDRCELL="\clbrdrt\brdrs\clbrdrb\brdrs" TABLES_OFF="SysTitleAndFooterContainer");

proc template;

        define style docstyls;

        parent=styles.rtf;

            %** Table style;

            style table from table /

                protectspecialchars = off

                cellpadding = 1pt

                cellspacing = 1pt

                borderwidth = 0px

                asis = on

                ;

            %*** Set margins;

            style body from document /

          bottommargin = 3.175cm

      topmargin    = 3.175cm

      rightmargin  = 2.54cm

      leftmargin   = 3.81cm;

                ;

            %*** Set header background;

            style header from header /

                background = _undef_

                ;

            %*** Set title alignment;

            style systemtitle from systemtitle /

                just = l

                ;

            %*** Set footnote alignment and font;

            style systemfooter from systemfooter /

                asis = on

                font = fonts('docFont')                                  

                just = l

                ;

            %*** To supress after title and before footnote space;

            style parskip /

                fontsize = 1pt

                ;

            %*** Set fonts;

            replace fonts /

      'CellFont'             = ("Times New Roman",10pt)

      'CellFont2'            = ("Times New Roman",9pt)

      'TitleFont2'           = ("Times New Roman",10pt,Bold)

      'TitleFont'            = ("Times New Roman",10pt,Bold)

      'StrongFont'           = ("Times New Roman",10pt,Bold)

      'EmphasisFont'         = ("Times New Roman",10pt,Italic)

      'FixedEmphasisFont'    = ("Times New Roman",10pt,Italic)

      'FixedStrongFont'      = ("Times New Roman",10pt,Bold)

      'FixedHeadingFont'     = ("Times New Roman",10pt,Bold)

      'BatchFixedFont'       = ("Times New Roman",10pt)

      'FixedFont'            = ("Times New Roman",10pt)

      'headingEmphasisFont'  = ("Times New Roman",10pt,Bold Italic)

      'headingFont'          = ("Times New Roman",10pt,Bold Italic)

      'docFont'              = ("Times New Roman",10pt);

                ;

        end;

    run;

4 REPLIES 4
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

I do not know of a way.  The reason is that titles/footnotes only appear once in the RTF code.  When it is opened by Word, it is Word which places that text into its own titles/footnotes object which by default repeats on each page.  TBH I don't even know of a way to do this directly in Word, the reason being is that I have never seen such a request.  By their nature, titles and footnotes are associated with a page.  If you do not want that strcuture then you are better off outputting to HTML.

All I can suggest is that you drop t/f and have a pre-print output with "titles" as first print, then your report, then a final "foonotes" print.

Rajaram
Obsidian | Level 7

Thanks RW9.

 

I am working on statistical report automation. Now I moved to tagset to RTF. Tagset is not helpful in this case. I am not outputing titles and footnotes and not giving pagebreak as well in SAS instead directly adding it by post processing. I also modified my template as follows and working fine.

 

style table from table /
     protectspecialchars = off
     asis = on
     cellpadding = 1pt
     cellspacing = 1pt
     borderwidth = 1pt
     frame = hsides
     rules = groups
    ;

 

 

ballardw
Super User

If you want to control text you may need to go to ODS TEXT for the "Title". ODS TEXT is only executed once and would be in body of the document not the Header which is default for RTF. Alternatively on your ODS RTF you could use the option bodytitle. However you would still get multiple titles if the first procedure to use the title has output that spans multiple pages. The title would also have to be turned off after the first procedure.

 

Unfortunately the ODS TEXT option doesn't work (at least for versions 9.3 and earlier) unless there is procedural output following. Depending on the procedure you are using you may be able to use the Style=Posttext option to generate text that follows the procedure. This does behave differently than a footnote though and does not go into the footer section of an RTF document.

 

Depending on exactly how you want your solid line at the bottom of a page to appear it may or may not be possibly with a SAS style template. The SAS style Journal generates generates output with lines across the bottom of procedural output and may provide one approach. Or generate an RTF document that only contains a single line where you want it with a single line of text for reference and then examine the RTF code in a plain text editor such as notepad for the codes that look like they generate the line. Then Escapechar and the RAW tag may let you insert a line as needed.

 

If you aren't doing a large number of documents the Word border feature may be easier.

Rajaram
Obsidian | Level 7
Thank you ballardw. I solved issue similar to your suggestion.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2231 views
  • 2 likes
  • 3 in conversation