The SAS Output Delivery System and reporting techniques

Proc Report question

Reply
SAS Employee
Posts: 105

Proc Report question

Hi,
I made this code:

ods html file= "xxxx.html"
proc report data=temp nowindows noheader headskip nowd missing ;
column pt txt;
define pt /order left ;
define txt /group width=150 ;
compute after txt;
line ' ';
endcomp;
compute after pt;
line ' ';
endcomp;
compute before ;
line @50 'Repeat Error';
line '';
endcomp;
run;
ods html close;

Im trying to foreground the 'Repeat Error' with red color without succes....
I tried to use call defined after the compute before statment-its not working.

Any ideas?

Thanks in advanced
SAS Super FREQ
Posts: 8,743

Re: Proc Report question

Hi:
The style override for a line statement can be supplied in one of two ways:
[pre]
proc report data=temp nowindows noheader nowd missing
style(lines)={foreground=red};
[/pre]

OR
[pre]
compute before / style={foreground=red} ;
line 'Repeat Error';
line ' ';
endcomp;
[/pre]

Also note that your HEADSKIP and WIDTH= options are not honored by ODS -- they are LISTING-destination only options. So, if you were hoping to get extra space after your headers or control the width of the TXT column -- you cannot use LISTING only options for the HTML destination. Also the "@50" in the LINE statement will have little impact on your text string, since in ODS HTML output. the LINE strings will be automatically centered.

Also, if the LISTING destination is open when you run this job, you might receive an error message such as this:
[pre]
ERROR: The width of txt is not between 1 and 96. Adjust the column width or line size.
[/pre]

...which is the result of having the LISTING destination open and setting the width of TXT to be 150. The way to get rid of this error message is to explicitly close the LISTING window:
[pre]
ods listing close;
[/pre]

cynthia
SAS Employee
Posts: 105

Re: Proc Report question

Hi cynthia,
Thanks alot for your help.
The reason i have listing options is because im also the using ods listing option
(i didnt show it in the code beacuse it wasnt relevent to my question).
Ask a Question
Discussion stats
  • 2 replies
  • 1338 views
  • 0 likes
  • 2 in conversation