The SAS Output Delivery System and reporting techniques

Formatting Column titles ODS

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 131
Accepted Solution

Formatting Column titles ODS

[ Edited ]
LOAN_NUM BORROWER_LAST_NAME APP_DATE

CLOSED_DATE

 

 

 

PROC REPORT DATA= al_loans headskip split='*' wrap nowd
style(report)=[background=black cellspacing=10 just=center font_size=9pt font_face="Calibri" bordercolor=black borderwidth=1]
style(column)=[background=white font_size=10pt bordercolor=black borderwidth=1]
 
;
COLUMNS _ALL_;
define LOAN_NUM / Display style(column)={cellwidth=80pt just=right};
define BORROWER_LAST_NAME / Display style(column)={cellwidth=80pt just=right};
define app_date / Display style(column)={cellwidth=90pt just=right};
define closed_date / Display style(column)={cellwidth=90pt just=right};

 

The column titles are displaying with the titles at the bottom of the cell.  Is there a way to get the titles to appear at the top of the cell and automatically(dynamically) increase the width of the cell so the columns will fit without some of the title skipping to the next line?


Accepted Solutions
Solution
‎03-28-2017 10:42 AM
SAS Super FREQ
Posts: 8,716

Re: Formatting Column titles ODS

Hi:
In addition, cell widths of 80 pt and 90 pt might not be the best unit to use. If your destinations is HTML, RTF, or Excel, you will be forcing point to internal measurement conversion. For example, in ODS RTF, those cell widths will need to be converted to TWIPS.

But, I agree with Reeza -- we need to see ALL your code, not just part of your code, including ODS destinations and the RUN; statement, for example. Oh, and data would be nice or replicate your issue using SASHELP.CLASS.

And I don't understand what you mean when you say "The column titles are displaying with the titles at the bottom of the cell." If you "over control" the cell width, ODS has no choice but to wrap the cell contents whether the cell is a data cell or a header cell.

Also options like WRAP and HEADSKIP are ignored by ODS and only respected by the LISTING/Output window; while options like your STYLE overrides are ONLY respected by ODS destinations that support style -- so it seems like you want your code to do double duty for both LISTING and ODS, but you don't provide enough information to even run a test.

cynthia

View solution in original post


All Replies
Grand Advisor
Posts: 17,312

Re: Formatting Column titles ODS

What is your ODS destination, PDF, RTF, PPTX, Excel?

 

PS. Please format your posts to make them legible.

Solution
‎03-28-2017 10:42 AM
SAS Super FREQ
Posts: 8,716

Re: Formatting Column titles ODS

Hi:
In addition, cell widths of 80 pt and 90 pt might not be the best unit to use. If your destinations is HTML, RTF, or Excel, you will be forcing point to internal measurement conversion. For example, in ODS RTF, those cell widths will need to be converted to TWIPS.

But, I agree with Reeza -- we need to see ALL your code, not just part of your code, including ODS destinations and the RUN; statement, for example. Oh, and data would be nice or replicate your issue using SASHELP.CLASS.

And I don't understand what you mean when you say "The column titles are displaying with the titles at the bottom of the cell." If you "over control" the cell width, ODS has no choice but to wrap the cell contents whether the cell is a data cell or a header cell.

Also options like WRAP and HEADSKIP are ignored by ODS and only respected by the LISTING/Output window; while options like your STYLE overrides are ONLY respected by ODS destinations that support style -- so it seems like you want your code to do double duty for both LISTING and ODS, but you don't provide enough information to even run a test.

cynthia
☑ This topic is SOLVED.

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

Discussion stats
  • 2 replies
  • 136 views
  • 2 likes
  • 3 in conversation