Hi,
SAS 9.2 on Windows
Submit this code, and compare the two attached outputs.
filename temp temp;
options orientation=portrait nodate nonumber spool;
ods _all_ close;
ods escapechar = '^';
ods pdf file=temp notoc startpage=no style=SeasidePrinter;
title;
footnote;
proc report data=sashelp.class nowd;
columns sex age name height weight;
define sex / order;
define age / order;
define name / display;
define height / analysis;
define weight / analysis;
quit;
ods pdf close;
ods listing;
The Have.png file is the default output. The Want.png file is the desired output. Is this possible, perhaps with PROC TEMPLATE? Does PROC REPORT use a different style for an ORDER variable vs. DISPLAY variable?
As far as I can tell, I would just need to turn BORDERBOTTOMSTYLE= off unless the ORDER variable = last.variable (???). But, I'm unfamiliar with all the style elements in PROC REPORT, and whether I can do this in PROC TEMPLATE vs. having to code this "manually" in a compute block.
I can't remember if this is how PROC TABULATE would create the output, but I'd prefer using PROC REPORT rather than PROC TABULATE, since that is what I'm using for the rest of my report.
Thanks,
Scott
You want PROC REPORT statement option SPANROWS.
You want PROC REPORT statement option SPANROWS.
Hi:
DATA_NULL_'s answer is the correct answer. If you have ORDER or GROUP variables, then starting in SAS 9.2, you can use the SPANROWS option. SPANROWS will not operate or work with DISPLAY variables. I talked about SPANROWS here:
http://blogs.sas.com/content/sastraining/2011/02/28/whats-so-great-about-spanrows/
to give you the type of spanning row behavior that looks like the TABULATE output.
cynthia
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.