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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 3 replies
  • 166 views
  • 0 likes
  • 2 in conversation