Hi:
The WIDTH option inside PROC REPORT:
[pre]
define charvar / display width=10 'CharVar';
[/pre]
is a LISTING only option and is generally ignored by any destination other than LISTING. This is also true of other PROC REPORT options, such as: HEADLINE, HEADSKIP, DOL, DUL, OL, UL, SKIP, FLOW, SPACE and PANELS.
If you have a Stored Process that is returning results to Microsoft Word via the SAS Add-in for Microsoft Office, as part of the SAS Enterprise Intelligence Platform (BI Platform). Then some of the ODS STYLE= options may work for you to set the table width. For example, if you wanted the WHOLE TABLE to be 100% of the available area, then you would use this code for HTML, RTF and PDF results:
[pre]
proc report data=mylib.mytable nowd
style(report)={outputwidth=100%};
[/pre]
For example, if I run this code in Base SAS (not as a stored process), then all the output tables are the same size in HTML, RTF and PDF:
[pre]
ods rtf file='c:\temp\outwidth.rtf' startpage=no;
ods pdf file='c:\temp\outwidth.pdf' startpage=no;
ods html file='c:\temp\outwidth.html' style=sasweb;
proc report data=sashelp.class(obs=2) nowd
style(report)={outputwidth=80%};
column name age height;
run;
proc report data=sashelp.shoes(obs=2) nowd
style(report)={outputwidth=80%};
column region product sales;
run;
proc report data=sashelp.prdsale(obs=2) nowd
style(report)={outputwidth=80%};
column region country actual;
run;
ods _all_ close;
[/pre]
In addition to the OUTPUTWIDTH style attribute, which is available for the whole table; it is also possible to alter individual cellwidths on the DEFINE statement by using the CELLWIDTH style attribute.
Note that In SAS 9.1.3, the attributes were OUTPUTWIDTH and CELLWIDTH; in SAS 9.2, the attributes were simplified to just WIDTH. However, the older syntax attribute names still work for compatibility. so these are equivalent statements:
[pre]
proc report data=sashelp.class(obs=2) nowd
style(report)={outputwidth=80%};
proc report data=sashelp.class(obs=2) nowd
style(report)={width=80%};
define charvar / display style(column)={cellwidth=1in};
define charvar / display style(column)={width=1in};
[/pre]
There IS a possibility, however, that your ODS style overrides may only work if the Stored Process result type is set to HTML or RTF. Sometimes, the default result type for Stored Processes in the Add-in is SASReport XML -- there is a chance that the ODS style overrides will not work for that result type. This is an instance where you might need to work with the person who developed the Stored Process to determine whether or not they want to change the result type (&_ODSDEST) to HTML or RTF specifically for this Stored Process.
Keep in mind that not all client applications can read RTF result types from a Stored Process. If you are going to want the most flexible Stored Process, the result type should be HTML, because most client applications can read this result type. (The only 2 client applications that CANNOT process HTML results from a Stored Process are SAS Web Report Studio and Microsoft PowerPoint -through the Add-in. These 2 client apps can ONLY receive SASReport XML results from a Stored Process.)
cynthia