The SAS Output Delivery System and reporting techniques

Tableeditor Proc Report Sort

Reply
N/A
Posts: 0

Tableeditor Proc Report Sort

How would I sort by job_class, osha_rate1, and lost_rate1 (ie I want to ignore year)? osha_rate1 and lost_rate1 are both nested in year (year is equal to 2008, 2009, 2010).
Thank you.

ods tagsets.tableeditor file="C:\Documents and Settings\summary_job.htm"
options(sort="yes"
sort_arrow_color="green"
sort_underline="no"
describe="yes"
);
proc report data=jobyear3 nowd contents="Summary Table-Jobs"
style(header)=[font_weight=bold] out=test;
options missing='0';
columns job_class year, (osha_rate1 lost_rate1);
SAS Super FREQ
Posts: 8,862

Re: Tableeditor Proc Report Sort

Posted in reply to deleted_user
Hi:
Since YEAR is going to be an ACROSS item and that OSHA_RATE1 and LOST_RATE are going to be nested underneath YEAR. I'm not sure how the sort will work using TAGSETS.TABLEEDITOR (whether you can skip the row with YEAR or not).

One alternative would be to create a "flat" version of the report data (using OUT= on the PROC REPORT statement). This will cause the ACROSS columns to be named _C2_, _C3_, _C4_, etc. Then you would use the new dataset with these column names in the TAGSETS.TABLEEDITOR step. Since you can relabel the column names in the DEFINE statements, you won't have to worry about folks seeing the absolute column names (_C2_, etc).

Before you go down this route, you might wish to check with Tech Support about using TAGSETS.TABLEEDITOR and its sort capability.

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 117 views
  • 0 likes
  • 2 in conversation