BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rjacko10
Calcite | Level 5

Hello all,

The RTS (row header space) option isn't working on my wide tables. Can any explain why this is, and how to get a uniform row header space across all my tables?

I've also tried using WIDTH under STYLE ROWHEADER on the PROC FORMAT statement. This had some success with the narrower tables, but is totally ignored on my very wide tables.

This is very frustrating!

Thank you,

Rob

Output

Programme

PROC IMPORT OUT= WORK.DATAMONITORING

            DATAFILE= "H:\Desktop\Holding\datamonitoring.xlsx"

            DBMS=EXCEL REPLACE;

     RANGE="datamonitoring";

     GETNAMES=YES;

     MIXED=NO;

     SCANTEXT=YES;

     USEDATE=YES;

     SCANTIME=YES;

RUN;

proc template;

    define style Styles.Custom;

    parent = Styles.Default;

    style SystemTitle /

        FONT_FACE = "Calibri, Segoe UI, Times New Roman"

           FONT_SIZE = 6

           FONT_WEIGHT = bold

         /*font_style=italic*/

           FONT_STYLE = roman

           FOREGROUND = midnightblue

           BACKGROUND = white;

    style body /

           BACKGROUND = white;

    style Table /

           BACKGROUND = white

        FRAME = BOX

        RULES = ALL

        CELLSPACING = 0

        CELLPADDING = 2;

    style rowheader /

          FONT_FACE = "Calibri, Segoe UI, Times New Roman"

           FONT_SIZE = 4

           FONT_WEIGHT = medium

           FONT_STYLE = roman

           FOREGROUND = black

           BACKGROUND = aliceblue;

    style header /

        FONT_FACE = "Calibri, Segoe UI, Times New Roman"

           FONT_SIZE = 4

           FONT_WEIGHT = medium

           FONT_STYLE = roman

           FOREGROUND = black

           BACKGROUND = aliceblue;

    style Data /

        FONT_FACE = "Calibri, Segoe UI, Times New Roman"

           FONT_SIZE = 4

           FONT_WEIGHT = light

           FONT_STYLE = roman

        FOREGROUND = black

           BACKGROUND = white;

    style SysTitleAndFooterContainer /

        CELLSPACING = 0;

    style SystemFooter /

        ;

    end;

run;

/****All countries****/

data All;

    set WORK.DATAMONITORING;

    keep country_name organisation_name _date;

    label     country_name='Country'

            organisation_name='Site'

            _date ='Date of recruitment (mm/yyyy)';

    format _date mmyys7.;

    _date=input(trim(dateRandomisation),ddMMYY10.);   

run;

proc format;

    value colour     low - 1     = F5A9A9

                    2            = F5BCA9

                    3            = F5D0A9

                    4            = F3E2A9

                    5            = F2F5A9

                    6            = E1F5A9

                    7            = D0F5A9

                    8            = BCF5A9

                    9 - high    = A9F5A9;

run;

ods html body='C:\Users\ENPHRJAC\Google Drive\Work\Stat Prog\Programmes\Output\WOMAN Recruitment.htm' style=custom;

options nocenter missing=0 orientation=landscape;

proc tabulate data=All style=custom;

    weight _date;

    class country_name organisation_name;

    class _date;

    classlev organisation_name _date / S=[background=CXC9D4F9 font_size=2];

    table country_name="Recruitment:",

          organisation_name="Site"*[style=[background=colour.]] all='Total'*[style=[background=cornsilk font_weight=bold]],

          (_date all='Total'*[style=[background=cornsilk font_weight=bold]])*(N=' ')

          / RTS=500;

    title;

   

run;

ods html close;

ods markup close;

ods listing;

1 ACCEPTED SOLUTION

Accepted Solutions
OS2Rules
Obsidian | Level 7

Hi:

I think it is a function of HTML because we were getting split headings in some of our reports.

I added this:

  parent=styles.minimal;

    style Container /

          font_size = 6pt;

    style RowHeader from RowHeader /

          pretext='<NOBR>'

          posttext='</NOBR>';

to the Template - it is for the RowHeader - I'm sure you can find with attribute to change - which prevents the HTML from wrapping the text.

View solution in original post

3 REPLIES 3
OS2Rules
Obsidian | Level 7

Hi:

I think it is a function of HTML because we were getting split headings in some of our reports.

I added this:

  parent=styles.minimal;

    style Container /

          font_size = 6pt;

    style RowHeader from RowHeader /

          pretext='<NOBR>'

          posttext='</NOBR>';

to the Template - it is for the RowHeader - I'm sure you can find with attribute to change - which prevents the HTML from wrapping the text.

ballardw
Super User

Per the documentation, at least as of SAS 9.2.3, RTS only affects the traditional monospace output.

Use CLASSLEV for the varaible and specify width for each variable separately

classlev country_name /style={width=1in}; You can use diffent units.

Cynthia_sas
SAS Super FREQ

Hi:

  You are correct that RTS is for LISTING (or traditional monospace output); this is only one of the PROC TABULATE options that are specific to LISTING. If an option like RTS or FORMCHAR doesn't seem to work in TABULATE, it is always a good idea to check the doc.

cynthia

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1270 views
  • 3 likes
  • 4 in conversation