BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ScottBass
Rhodochrosite | Level 12

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

Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.
1 ACCEPTED SOLUTION

Accepted Solutions
data_null__
Jade | Level 19

You want PROC REPORT statement option SPANROWS.

View solution in original post

2 REPLIES 2
data_null__
Jade | Level 19

You want PROC REPORT statement option SPANROWS.

Cynthia_sas
SAS Super FREQ

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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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