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
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
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
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.