BookmarkSubscribeRSS Feed
ramanuj
Calcite | Level 5
I want to remove the border line above the column (Region and Subsidiary) using Proc report without proc tabulate.
report.png
ods html file='c:\temp\spanrows_behavior.html' style=sasweb; proc report data=sashelp.shoes nowd SPANROWS; title 'REPORT Output with SPANROWS'; column region subsidiary product,(sales sales=savg); define region / group style(column)=Header; define subsidiary / group style(column)=Header; define product / across 'Product Sales'; define sales / sum 'Sum' f=dollar10.; define savg / mean 'Mean' f=dollar10.; rbreak after / summarize style=Header; run; ods html close;

output.png
2 REPLIES 2
Cynthia_sas
Diamond | Level 26

Hi:

  The major difference between TABULATE and REPORT is the TABULATE BOX area that separates the column dimension headers from the row dimension headers. The screen shot you attached looks like TABULATE output. When you run your PROC REPORT code, the borderlines, as you call them, are evident as shown here:

PROC_REPORT_DEFAULT_HEADERS.png

 

...because PROC REPORT does not treat the area above REGION or SUBSIDIARY columns in a way that is "different" from the other headers. The fact that you have nested ACROSS items means that part of your header area needs 3 header rows for all the header cells. That will automatically put 2 blank rows above REGION and SUBSIDIARY variables. You might be able to get rid of the borders above ALL the header cells and ALL the data cells by changing the style(report) or changing the style template, or there might be a CSS way to do it. But if you want the TABULATE box area, then it would be better to use TABULATE.

 

cynthia

ramanuj
Calcite | Level 5

Thanks Cyntia,

Actually i have 4 level of across dimension and it is showing 4 blank above the grouped variables.I tried alot to remove those by proc report but unfortunately didn't happen.Yes from style we can hide those.Just wanted to confirm if that can be done from Proc report and now it is cleared.With proc tabulate the output is perfect.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2400 views
  • 0 likes
  • 2 in conversation