The SAS Output Delivery System and reporting techniques

Change box drawing for order variables in PROC REPORT ODS PDF

Accepted Solution Solved
Reply
Super Contributor
Posts: 387
Accepted Solution

Change box drawing for order variables in PROC REPORT ODS PDF

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


Want.pngHave.png

Accepted Solutions
Solution
‎05-31-2012 09:44 PM
Respected Advisor
Posts: 3,799

Re: Change box drawing for order variables in PROC REPORT ODS PDF

Posted in reply to ScottBass

You want PROC REPORT statement option SPANROWS.

View solution in original post


All Replies
Solution
‎05-31-2012 09:44 PM
Respected Advisor
Posts: 3,799

Re: Change box drawing for order variables in PROC REPORT ODS PDF

Posted in reply to ScottBass

You want PROC REPORT statement option SPANROWS.

SAS Super FREQ
Posts: 8,868

Re: Change box drawing for order variables in PROC REPORT ODS PDF

Posted in reply to ScottBass

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

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 234 views
  • 3 likes
  • 3 in conversation