Hi:
I just don't know what you mean when you say "expand the namefield".
PROC REPORT will NOT make NAMEFIELD wider on one row. The cell width for NAMEFIELD will have to be the SAME width on every row.
Seeing the first data that you posted (sorry I don't open XLSX files -- a DATALINES program is safer to open), it seems to me that you want the NAMEFIELD to be as wide as it needs to be for the longest value, and you don't want NAMEFIELD to wrap within the cellwidth.
Using some FAKEDATA, based on your original few rows, I created this output:
Here's the code I used:
data fakedata;
length namefield $150 jobfield $50 combo_cd $50;
infile datalines dlm=',';
input page row namefield $ amount pos_pool jobfield $ combo_cd $ bold rwidth;
datalines4;
1,1,444444-Testing the Namefield if row width can be extended,1,1,112121-The Northwest Tornado Chasers,1,1,1
1,2,Mary McKee,10000,11112222,Administrative Assistant,ztornado-WA1,.,.
1,3,Mary McKee-1,200000,00011122,Administrative Assistant,ztornado-WA1,.,.
1,4,Mary McKee-2,155555,01112222,Administrative Assistant,725ztornado-WA1,.,.
2,1,454545-Testing the Namefield if row width can be extended,1,1,112121-The Northwest Comet Watchers,1,1,1
2,2,Alan Archer,10001,11112222,Sales Assistant,zcomet-WA2,.,.
2,3,Barbara Barton,200002,00011122,Administrative Assistant,zcomet-WA2,.,.
2,4,Clive Corleone,155553,01112222,CEO Assistant,725zcomet-WA2,.,.
;;;;
run;
ods listing close;
options nonumber nodate orientation=portrait papersize=LETTER missing='';
title; footnote;
ods pdf file="c:\temp\testing_wide_cell.pdf";
proc report data=fakedata nowindows missing split='|'
style(report)={just=left cellpadding=2px}
style(header)={font_size=9pt}
style(column)={font_size=7pt};
column page row bold rwidth namefield pos_pool jobfield amount combo_cd;
define page / order noprint order=data;
define row / order noprint;
define bold/order noprint;
define rwidth / display noprint;
define namefield/ display "NAME" style(column)={width=3in just=l};
define pos_pool/ display "POSITION/POOL" style(column)={just=l};
define jobfield/ display "POSITION TITLE" style(column)={width=2in just=l};
define amount/ display "TOTAL" format=comma32.2 style(column)={just=r};
define combo_cd/ display "DEPT/FUND" style(column)={just=r};
compute bold;
if bold eq 1 then call define(_row_,"style","style={font_weight=bold}");
endcomp;
run;
ods pdf close;
Note that I made the font size for the columns 7pt and made the font size for the headers 9pt. Then I reduced the cellpadding in the cell, so that the long value for NAMEFIELD would fit in 3 inches.I got rid of the spacing=1 because it is a LISTING only option that would be ignored by ODS PDF. rather than "overcontrol" the cellwidths, I only adjusted the cellwidth for NAMEFIELD and JOBFIELD.
There is NOT a way in PROC REPORT to do the equivalent of "merge cells" in Excel.
Hope this gets you closer to your goal.
Cynthia
... View more