Desktop productivity for business analysts and programmers

Left align ouput

Reply
N/A
Posts: 0

Left align ouput

Hi,

I've got some code that generates several tables in HTML in EG.
When I look at the output, all the tables are centered. I want them aligned to the left.

Can anyone help me?

Thierry
SAS Super FREQ
Posts: 8,721

Re: Left align ouput

Hi:
Try putting
[pre]
options nocenter;
[/pre]

before your ODS HTML step. That will left align everything, including the table and titles, and any text you might place with ODS TEXT=etc.

If what you mean is that you want the title to remain centered and ONLY the table to be left justified, then try this:
[pre]
options center;
ods html file='c:\temp\usestyle.html' style=sasweb;
proc print data=sashelp.class
style(table)={just=l};
title 'This Should Still Be Centered';
run;
ods html close;
[/pre]

If you are using PROC REPORT or PROC TABULATE, you'd use slightly different syntax with those procedures, as defined in the documentation.

cynthia
N/A
Posts: 0

Re: Left align ouput

Hi Cynthia,

It works! Thanks!!!

Thierry
N/A
Posts: 0

Re: Left align ouput

Well, it works almost....

Running the Stored Process in EG, it works fine. But if I run the Stored Process in Web Report Studio, it doesn't work... WRS aligns the table in the center.
I've also tried the following code:

proc tabulate data=sashelp.class ;
class sex ;
var weight ;

table sex all
,
weight*[style=[font_weight=bold]]
/style=[just=left]
;
run ;

Again, in EG it works perfect, but in WRS the last style code doesn't work...

Thierry
SAS Super FREQ
Posts: 8,721

Re: Left align ouput

Hi..sorry 'bout that. If I had realized you were talking about a stored process, I would have warned you about that. When you run a stored process and return the results to Web Report Studio (WRS), the results are NOT HTML, RTF or PDF, which would be affected by the NOCENTER option.

Results that are returned to WRS are returned in SASReport XML format and then, inside WRS, those results are rendered for viewing within the WRS "screen". SAS Options and styles are generally NOT used by WRS because they are not meaningful options for SASReport XML.

cynthia
N/A
Posts: 0

Re: Left align ouput

Hi Cynthia, So there's no way to outline the output to the left?

Thierry
SAS Super FREQ
Posts: 8,721

Re: Left align ouput

Hi, TH:
If there's a way to turn off centering using Web Report Studio report options, then your output would be left-aligned. but I believe the default is centered for the default treatment of SAS Report XML -- at least what comes from a stored process.

You might check with SAS Technical Report to fine out definitively whether there's a way to change the alignment to left alignment in the Cascading Style Sheet used to render the output (or look in the Platform Administration Guide).

cynthia
N/A
Posts: 0

Re: Left align ouput

Hi Cynthia,

Ok, I will do that. Thanks alot for your help.

Thierry
Ask a Question
Discussion stats
  • 7 replies
  • 4903 views
  • 0 likes
  • 2 in conversation