- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am using proc report to generate report then output with ODS RTF. In the expected report (attached) column “Location” include four rows. We expect row1” Total # of Participants in the country” be align left, while other rows (City1, City2 and City3) to be on CENTER.
Question:
Is there any way to align some rows left and some rows center in one column using proc report?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Defense wrote:
I am using proc report to generate report then output with ODS RTF. In the expected report (attached) column “Location” include four rows. We expect row1” Total # of Participants in the country” be align left, while other rows (City1, City2 and City3) to be on CENTER.
Question:
Is there any way to align some rows left and some rows center in one column using proc report?
Show the code for proc report and reference which elements need which alignment. Style overrides can be specified for each element and even conditionally with a little work. But guessing which variable and what not is kind of problematic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
ods rtf file="&outdir\Table1.rtf";
title1 'Table XX';
title2 'Members by Country and City ';
proc report data=table NOWD;
column Location All;
define Location /"Location" style=[cellwidth=1 in font =("Arial",8) just=c];
define All /display "All" style=[cellwidth=1 in font =("Arial",8) just=c];
run;
ods rtf close;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This shows how to colour the cells but the STYLE can also include the alignment/justification.
This is know as conditional formatting.
http://support.sas.com/kb/23/353.html
@Defense wrote:
ods rtf file="&outdir\Table1.rtf";
title1 'Table XX';
title2 'Members by Country and City ';
proc report data=table NOWD;
column Location All;
define Location /"Location" style=[cellwidth=1 in font =("Arial",8) just=c];
define All /display "All" style=[cellwidth=1 in font =("Arial",8) just=c];
run;
ods rtf close;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks