05-31-2012 09:11 PM
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;
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;
ods pdf close;
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.
06-01-2012 09:25 AM
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:
to give you the type of spanning row behavior that looks like the TABULATE output.
Need further help from the community? Please ask a new question.