BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
whymath
Lapis Lazuli | Level 10

I am planing to use ods tagsets.rtf to replace ods rtf in my work gradually. Just meet the problem at the very first day: how to output pretext without table frame using ods tagsets.rtf, just like ods rtf?

1.jpg

The test code:

option nodate nonumber;
title;
footnote;

ods tagsets.rtf file='test.rtf' style=threeline startpage=no;
proc report data=sashelp.class nowd 
  style(report)={pretext='Title'} style(report)={posttext='Footnote'};
run;
ods tagsets.rtf close;

ods rtf file='test2.rtf' style=threeline startpage=no;
proc report data=sashelp.class nowd 
  style(report)={pretext='Title'} style(report)={posttext='Footnote'};
run;
ods rtf close;
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

The option you want would be Options(tables_off='<one or more of the locations>') on the ODS TAGSETS.RTF statement.

 

Look in the documentation of TAGSETS.RTF for the locations. I think you may want 'usertext' in this case. Maybe. I am not sure which style element that PRETEXT goes into as the general ODS documentation gets hard to trace down all such. So it might be  something else like 'NoteBanner'

ods tagsets.rtf file='test.rtf' style=threeline startpage=no options(tables_off='usertext');

Note, when you  use custom style, such as your STYLE=THREELINES in your ODS destination you should be prepared to include the definition of that style as we have no way of telling what the impact of that style may be having on any appearance related questions.

View solution in original post

3 REPLIES 3
whymath
Lapis Lazuli | Level 10
As you can see, the output pretext of ods tagsets.rtf is located at a table, I don't want that, I want to remove the table frame of pretext, just like ods rtf does.
Thank you for any hints.
ballardw
Super User

The option you want would be Options(tables_off='<one or more of the locations>') on the ODS TAGSETS.RTF statement.

 

Look in the documentation of TAGSETS.RTF for the locations. I think you may want 'usertext' in this case. Maybe. I am not sure which style element that PRETEXT goes into as the general ODS documentation gets hard to trace down all such. So it might be  something else like 'NoteBanner'

ods tagsets.rtf file='test.rtf' style=threeline startpage=no options(tables_off='usertext');

Note, when you  use custom style, such as your STYLE=THREELINES in your ODS destination you should be prepared to include the definition of that style as we have no way of telling what the impact of that style may be having on any appearance related questions.

whymath
Lapis Lazuli | Level 10

Thank you, that is really what I want. I also add vspace="no" option to compress extra empty lines. The definition of style THREELINE that I used is:

 

proc template;
  define style Styles.Threeline;
    parent = styles.rtf;
    style fonts /
      'docFont' = ("times new roman",10.5pt)
      'FixedFont' = ("times new roman",10.5pt)
      'FootFont' = ("times new roman",10.5pt)
      'headingFont' = ("times new roman",10.5pt)
      'headingEmphasisFont' = ("times new roman",10.5pt)
      'BatchFixedFont' = ("times new roman",10.5pt)
      'FixedHeadingFont' = ("times new roman",10.5pt)
      'FixedStrongFont' = ("times new roman",10.5pt)
      'FixedEmphasisFont' = ("times new roman",10.5pt)
      'EmphasisFont' = ("times new roman",10.5pt)
      'StrongFont' = ("times new roman",10.5pt)
      'TitleFont2' = ("times new roman",10.5pt)
      'TitleFont' = ("times new roman",10.5pt);
    style header /
      asis = on
      textalign = center
      fontsize = 10.5pt
      fontfamily = "times new roman"
      backgroundcolor = white;
    style Body from Document /
      marginleft = 1.5cm
      marginright = 1.5cm
      margintop = 1.5cm
      marginbottom = 1.5cm;
    style table from table /
      cellpadding = 0.5pt
      borderspacing = 0pt
      rules = groups
      frame = hsides
      width = 100%;
  end;
run;

Thank you for reminding me.

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 3 replies
  • 614 views
  • 0 likes
  • 2 in conversation