DATA Step, Macro, Functions and more

ODS Multiple Rows; Color Coded Columns

Posts: 59

ODS Multiple Rows; Color Coded Columns

I have a report that writes to ODS Output. Example

COLUMN                      ID  LAST_NAME  FIRST_NAME    WEST    EAST   SOUTH

Sample Output              1   SMITH           JOHN                  Y                       Y

Now I need to show a row on top and color code the last three variables based on name

Sample Desired                               MY FIRST ROW

                                      Detail                                  ZONE1   ZONE2    ZONE3
COLUMN               ID  LAST_NAME  FIRST_NAME    WEST      EAST     SOUTH      
                            1   SMITH           JOHN                  Y                              Y

The DETAIL area should not change.  The Column and header is already blue Here is the present code for the style

style(report)=[background=black cellspacing=10 just=center font_size=11pt font_face="Calibri" bordercolor=black borderwidth=1]

style(column)=[background=white font_size=10pt bordercolor=black borderwidth=1]

style(header)=[background=blue font_weight=bold foreground=white bordercolor=black borderwidth=1]


MY FIRST ROW should be the first row header

DETAIL  ZONE1 2 and 3 should be the second row headers

The ZONE1 should have a header(WEST) and row header=GREEN

The ZONE2 should have a header(EAST) and row header=RED

The ZONE3 should have a header(SOUTH) and row header=BLUE

Super User
Posts: 13,528

Re: ODS Multiple Rows; Color Coded Columns

Posted in reply to omega1983

Which procedure are you using to generate your report? Appearance options vary by procedure and you may not need to change a style to get desired results. An example of the code you are currently using would be helpful.

Posts: 9,368

Re: ODS Multiple Rows; Color Coded Columns

Posted in reply to omega1983


  I agree with ballardw...the procedure you use and your ODS destination of choice (HTML, RTF, PDF) might make a difference. Based on the few code snippets you show, I would expect that you might be using PROC REPORT. For color coding based on name, see an example in my SGF paper with Allison Booth using PROC REPORT on page 13 of this paper (, where the color coding is based on whether name='Alice' and age = 13 using the CALL DEFINE statement.


Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation