I am running the below code and facing couple of issues.
You will notice that executing the output of 3 datasets in a single email through proc report. However the problem is my objective is to have the header only on the fisrst one, but for me to be able to do that I have to give the option of title " " in the other 2 reports or else the output picks up the title from the first proc report.
When i do that now, the title is blank but there is still a grey box which i really dont want
The second issue there are some numbers that are -ve in the output. I need them in a format that represents -3 as (3). Could you suggest me a format to accomplish that.
Below is the code
*rsubmit;
filename OUTBOX1 email
to=("XYZ@ab.com"
)
type='text/html' subject=" Daily Acquisition " ;
ods listing close ;
ods html body = OUTBOX1 style=sasweb;
option nocenter ;
proc report nowd data=Dc nowindows headline headskip split='*'
style(REPORT)={frame=box cellspacing=1 }
style(HEADER)={background=#cccfff font_face=Tahoma font_size=1}
style(COLUMN)={foreground=#000000 background=white font_face=Tahoma font_size=1}
style(LINES)={foreground=white background=black font_face=Tahoma font_weight=bold font_size=1};
column type apps1 acts per ;
title "Daily Acquisition 29MAR2010";
define apps1 / '# Apps' format=comma16. center display;
define acts/ '# Accts' format=comma16. center display;
define per/ '% Appr' format=percent16.1 center display;
compute apps1 ;
if apps1 lt 0 then
call define(_col_,'style','style=[foreground=red]');
else
call define(_col_,'style','style=[foreground=black]');
endcomp;
compute acts;
if acts lt 0 then
call define(_col_,'style','style=[foreground=red]');
else
call define(_col_,'style','style=[foreground=black]');
endcomp ;
rbreak after / style= sasweb;
proc report nowd data=ba nowindows headline headskip split='*'
style(REPORT)={frame=box cellspacing=1 }
style(HEADER)={background=#cccfff font_face=Tahoma font_size=1}
style(COLUMN)={foreground=#000000 background=white font_face=Tahoma font_size=1}
style(LINES)={foreground=white background=black font_face=Tahoma font_weight=bold font_size=1};
column type apps1 acts per ;
title " ";
define apps1 / '# Apps' format=comma16. center display;
define acts/ '# Accts' format=comma16. center display;
define per/ '% Appr' format=percent16.1 center display;
compute apps1 ;
if apps1 lt 0 then
call define(_col_,'style','style=[foreground=red]');
else
call define(_col_,'style','style=[foreground=black]');
endcomp;
compute acts;
if acts lt 0 then
call define(_col_,'style','style=[foreground=red]');
else
call define(_col_,'style','style=[foreground=black]');
endcomp ;
proc report nowd data=PLC nowindows headline headskip split='*'
style(REPORT)={frame=box cellspacing=1 }
style(HEADER)={background=#cccfff font_face=Tahoma font_size=1}
style(COLUMN)={foreground=#000000 background=white font_face=Tahoma font_size=1}
style(LINES)={foreground=white background=black font_face=Tahoma font_weight=bold font_size=1};
column type apps1 acts per ;
title " ";
define apps1 / '# Apps' format=comma16. center display;
define acts/ '# Accts' format=comma16. center display;
define per/ '% Appr' format=percent16.1 center display;
compute apps1 ;
if apps1 lt 0 then
call define(_col_,'style','style=[foreground=red]');
else
call define(_col_,'style','style=[foreground=black]');
endcomp;
compute acts;
if acts lt 0 then
call define(_col_,'style','style=[foreground=red]');
else
call define(_col_,'style','style=[foreground=black]');
endcomp ;
footnote "*XXXXX is included in the numbers ";
run;
ods html close;
ods listing;