Help using Base SAS procedures

Proc report question

Super Contributor
Posts: 1,041

Proc report question

I have MEAN values after doing a summary

Category      Mean

A                  3.56

B                  2.59

C                  8.54

If i use these mean values in the proc report with Display option in the define statement instead of Analysis as shown

define mean/display

and do a rbreak after / summarize;

Will I get missing values for Subtotal(break) and Total(rbreak) of MEAN variable????.I dont want to do a analysis because they are already Mean values

For other variables I want to use analaysis though to find the COUNTS etc


Posts: 9,371

Re: Proc report question

Posted in reply to robertrao

Hi, you can always make a test program to figure out the answer to these types of questions. See the example below. Since you referred to both BREAK and RBREAK, I made a few ORDER items so the report could have both a BREAK and RBREAK statement.

If you run the code, you will see that when a numeric report item has a usage of DISPLAY, there is *NOTHING* calculated for the item at any of the break lines. So it is not "missing", there is just an empty cell.


data test;

  infile datalines;

  input Othergrp $ Category $ Mean Counts FakeNum;



www A                  3.56  100  999

www B                  2.59  150  888

www C                  8.54  125  777

xxx A                  2.56  100  122

xxx B                  1.59  150  233

xxx C                  7.54  125  344

yyy A                  2.56  100  221

yyy B                  2.19  150  332

yyy C                  6.54  125  443



ods html file='c:\temp\testreport_usage.html' style=sasweb;


proc report data=test nowd;

  column othergrp category mean counts fakenum;

  define othergrp / order;

  define category / order;

  define mean / display;

  define counts / sum f=comma6.;

  define fakenum / sum f=comma6.;

  rbreak after / summarize;

  break after othergrp / summarize;


ods html close;

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation