The SAS Output Delivery System and reporting techniques

Proc report - border between colum headers and line statment (ODS Html)

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 12
Accepted Solution

Proc report - border between colum headers and line statment (ODS Html)

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


Accepted Solutions
Solution
‎11-01-2012 08:50 AM
Occasional Contributor
Posts: 12

Re: Proc report - border between colum headers and line statment (ODS Html)

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


All Replies
Solution
‎11-01-2012 08:50 AM
Occasional Contributor
Posts: 12

Re: Proc report - border between colum headers and line statment (ODS Html)

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

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

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