Sample 35643: How to customize the final summary line with a label in PROC REPORT if the RBREAK value is numeric
You cannot modify the RBREAK value of a numeric GROUP or ORDER variable in PROC REPORT. This example shows how to work around that by creating a new character variable that is equal to the value of the numeric GROUP or ORDER variable that you want to change.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This example illustrates a workaround to modifying the RBREAK value of a numeric GROUP or ORDER variable so that we can add the word "TOTAL" at the RBREAK level.
ods listing close;
ods html file="myfile.htm";
options nodate;
data example;
input Yrs 3. Type $ Val;
datalines;
1 Apples 2
2 Banana 4
1 Pears 6
2 Limes 8
1 Apples 2
2 Banana 4
1 Pears 6
2 Limes 8
;
run;
options missing=' ';
proc report nowd;
col yrs fred type val;
define type / order;
define val / sum;
define fred / computed center width=10 'Years' ;
define yrs / group noprint;
compute fred / char;
fred=put(yrs,$5.);
endcomp;
compute after;
fred='TOTAL';
endcomp;
rbreak after / summarize ol;
run;
ods html close;
ods listing;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This example shows you how to add your own text at the RBREAK level when the value is numeric for the GROUP or ORDER variable.
| Type: | Sample |
| Topic: | Query and Reporting ==> Creating Reports ==> Non Graphical Query and Reporting ==> Creating Reports Query and Reporting ==> Report Distribution Query and Reporting
|
| Date Modified: | 2009-04-27 15:32:25 |
| Date Created: | 2009-04-21 17:59:08 |
Operating System and Release Information
| SAS System | Base SAS | Microsoft Windows XP 64-bit Edition | | |
| Microsoft® Windows® for x64 | | |
| OS/2 | | |
| Microsoft Windows 95/98 | | |
| Microsoft Windows 2000 Advanced Server | | |
| Microsoft Windows 2000 Datacenter Server | | |
| Microsoft Windows 2000 Server | | |
| Microsoft Windows 2000 Professional | | |
| Microsoft Windows NT Workstation | | |
| Microsoft Windows Server 2003 Datacenter Edition | | |
| Microsoft Windows Server 2003 Enterprise Edition | | |
| Microsoft Windows Server 2003 Standard Edition | | |
| Microsoft Windows Server 2008 | | |
| Microsoft Windows XP Professional | | |
| Windows Millennium Edition (Me) | | |
| Windows Vista | | |
| 64-bit Enabled AIX | | |
| 64-bit Enabled HP-UX | | |
| 64-bit Enabled Solaris | | |
| ABI+ for Intel Architecture | | |
| AIX | | |
| HP-UX | | |
| HP-UX IPF | | |
| IRIX | | |
| Linux | | |
| Linux for x64 | | |
| Linux on Itanium | | |
| OpenVMS Alpha | | |
| OpenVMS on HP Integrity | | |
| Solaris | | |
| Solaris for x64 | | |
| Tru64 UNIX | | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | | |
| OpenVMS VAX | | |
| z/OS | | |