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

Hello everyone, I have a problem with finding a good way to format a table generated by proc report. My problem is simple but I haven't find a solution:

I generate tables using a macro-program and for 80% of the tables I have found a solution to my borderproblems, the rest are a bit trickier:

I use following code-snippet to generate headlines within the table itself for the different number of linegroups a given table has:

    %If %BQUOTE(&Rowgroup1) ne %Str(Given_text) %then %do;

        %If %BQUOTE(&Rowgroup1) ne %Str(Given_text2) %then %do;

            Compute before Rowgroup1/ style=[font_weight=bold textalign=left foreground=black ] ;

                 line @1 Rowgroup1row_head.;

            Endcomp;

        %End;

    %End;

The format row_head is created using ods_escapchar so when I add a border using compute before in another step, the line I print ends up above the border:

Headline1

Headline2

_________________________________________________________

                         Column level headers 1

          _________________________________________

         Column level headers 2.1 Column level headers 2.2

Inline format(header) nr 1

-----------------------------------------------------------------------------------------------------

(*Here the actual table starts)

1

2

3

4

.

.

.

n

__________________________________________________________

I would like to drop the Inline format(heade) nr 1 below the dotted line, between the values and the dotted line. I will probably have to use escapechar since I for flexibility override most formatting (ie, can't use frame=below in style(header)= at the beginning of the macro)

Any ideas? The code is several pages long so I don't post it now, I also realize there a probably several ways to do this.

Kind regars

Luonas

1 ACCEPTED SOLUTION

Accepted Solutions
Luonas
Calcite | Level 5

I finally solved it - with a solution that I should have thought of much sooner. I added another column to the data with the same value for every row. Then placed it first in order and used Compute before New_column and with a escapechar line statement adding a frame above.

//Luonas

View solution in original post

1 REPLY 1
Luonas
Calcite | Level 5

I finally solved it - with a solution that I should have thought of much sooner. I added another column to the data with the same value for every row. Then placed it first in order and used Compute before New_column and with a escapechar line statement adding a frame above.

//Luonas

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1636 views
  • 0 likes
  • 1 in conversation