The SAS Output Delivery System and reporting techniques

Spanned Header across all columns

Accepted Solution Solved
Reply
Contributor
Posts: 27
Accepted Solution

Spanned Header across all columns

How can I have a header span ALL the column in a report.  All the examples I've seen show a blank column in column 1.

Thanks,

Steve


Accepted Solutions
Solution
‎08-26-2015 02:25 PM
Respected Advisor
Posts: 3,775

Re: Spanned Header across all columns

proc report data=sashelp.class nowd list;
  
columns ('Table 1. SASHELP.Class' ('First Two' _character_) ('The rest' _numeric_));
   run;

View solution in original post


All Replies
Grand Advisor
Posts: 17,360

Re: Spanned Header across all columns

What's your destination? How are you generating your report?

Contributor
Posts: 27

Re: Spanned Header across all columns

sorry for not providing more detail.  I'm planning on using Proc Report.  Currently the report is going to Excel but I don't know if that's a hard-and-fast requirement.  If we could get it to RTF that might work just as well. 

Respected Advisor
Posts: 3,775

Re: Spanned Header across all columns

proc report data=sashelp.class nowd list;
  
columns ('Spanning all' _all_);
   run;
Contributor
Posts: 27

Re: Spanned Header across all columns

I tried to attach an example in Word but it said the file was too large.  In any case imagine the SASHELP.CLASS file with a header that spans the entire table with the text 'Table 1. SASHELP.Class'.  Underneath that are two spanned headers entitled 'First two variables' that span the Age and Sex columns and another header 'The other 3 variables' that span name, height and weight.  THen there'd be a row with Sex, Age, Name, Height and Weight with the actual data values following them. 

Steve

Solution
‎08-26-2015 02:25 PM
Respected Advisor
Posts: 3,775

Re: Spanned Header across all columns

proc report data=sashelp.class nowd list;
  
columns ('Table 1. SASHELP.Class' ('First Two' _character_) ('The rest' _numeric_));
   run;

Contributor
Posts: 27

Re: Spanned Header across all columns

Thanks data _null_.  That's just what I needed.

Steve

☑ This topic is SOLVED.

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

Discussion stats
  • 6 replies
  • 601 views
  • 0 likes
  • 3 in conversation