The SAS Output Delivery System and reporting techniques

How to get some colums (not all columns) centered while using ODS html, pdf?

Reply
Contributor
Posts: 24

How to get some colums (not all columns) centered while using ODS html, pdf?


1. I created html report, by default, some columns aligned right, some left. If I used j=c, all of columns would be centered. I just need desired columns centered, not all of them. So how do I need to do. I attached a report sample, I need to get first column center.

2. I also make the title color from sky blue to navy blue. I assume that sky blue is the default color for SASWeb and I am unable to change it, is that correct?

Thanks a lot!

Attachment
Super User
Posts: 11,343

Re: How to get some colums (not all columns) centered while using ODS html, pdf?

What code is used to make the report? Proc Print, Report and Tabulate allow you to provide many controls of appearance.

Title also allows overrides.

try

title color=green "your title text";

You can set color, justification, font and text size using options. See if your online help under Title statement has an entry for enhancing titles.

Contributor
Posts: 24

Re: How to get some colums (not all columns) centered while using ODS html, pdf?

I used proc report:

ods html3 file="&path\q8.html" style=sasweb;

proc report data=q8 nowd;

&t1 "Number of felmales " &t2, &ft;run;

ods html3 clos;

where can I get needed columns justified/aligned?

Thanks!


SAS Super FREQ
Posts: 8,864

Re: How to get some colums (not all columns) centered while using ODS html, pdf?


Hi:

  Look at the attached screenshot. It is quite colorful and I made the cells all a bit wider so you could see the exact impact of the various JUST= and some of the other options and style overrides that I used. And then I made the DESC column smaller so you could see the justification happened for the entire cell. The code in the second screenshot (for PROC PRINT) is what I used to produce this output, since you did not say what procedure you were using. I only put a few obs into the dataset because I didn't have much time.

  At any rate, PROC REPORT can put STYLE= overrides in the PROC REPORT statement, the DEFINE statement, the BREAK and RBREAK statements, the COMPUTE statement. There are a lot of previous forum postings about using STYLE= overrides. These techniques work with PROC PRINT, PROC REPORT and PROC TABULATE. The doc on each procedure has good information on using STYLE= overrides. There are a few differences between PRINT and REPORT. PROC REPORT uses STYLE(COLUMN) instead of STYLE(DATA) and since PROC REPORT doesn't have a VAR statement, you would use your style override in a DEFINE statement for each variable or report item.

  The PROC REPORT doc is very good and there are a lot of good examples on how to write PROC REPORT code and use STYLE= overrides.

cynthia


example_style_print.pngexample_just_print_style.png
Ask a Question
Discussion stats
  • 3 replies
  • 322 views
  • 0 likes
  • 3 in conversation