Hi, All:
I am trying to create customed headers by using PROC REPORT.
I would like to delete un-needed blanks in front of headers
(for example, one blank that is in front of "BBBBB", which I do not expect).
They, Unexpected Blanks, emerge if using inline formatting to draw borderlines, I think.
They disappeared when not using inline formatting.
I have no idea. Please help me.
Thank you in advance.
data test;
length column1-column3 $200.;
column1="aaaaa"; column2="bbbbb"; column3="ccccc"; output;
run;
ods rtf file="PleaseSpecifyYourOwnFolder\test.rtf";
proc report data=test nowindows
style(header)={backgroundcolor=white fontweight=light fontsize=8pt fontfamily="Times New Roman" asis=on}
style(report)={rules=groups frame=void borderwidth=0.5pt bordercolor=black}
;
column ("(*ESC*){style[fontfamily='Times New Roman' just=left]AAAAA}" column1
("(*ESC*){style[borderbottomcolor=black borderbottomstyle=solid borderbottomwidth=0.5pt]BBBBB}" column2)
("CCCCC" column3));
define column1 / display;
define column2 / display;
define column3 / display;
run;
quit;
ods rtf close;
If you choose ASIS=OFF things appear to work.
It doesn't really explain why there are blanks in the first place and it looks to me like using (*ESC*) is adding a blank - but it makes things work at least.
You probably should also add brackets around your style definition for column1.
Below code works for me.
proc report data=test nowindows
style(header)={backgroundcolor=white fontweight=light fontsize=8pt fontfamily="Times New Roman" asis=off}
style(report)={rules=groups frame=void borderwidth=0.5pt bordercolor=black}
;
column (
("(*ESC*){style[fontfamily='Times New Roman' just=left]AAAAA}" column1)
("(*ESC*){style[borderbottomcolor=black borderbottomstyle=solid borderbottomwidth=0.5pt ]BBBBB}" column2)
("CCCCC" column3)
);
define column1 / display;
define column2 / display;
define column3 / display;
run;
If you choose ASIS=OFF things appear to work.
It doesn't really explain why there are blanks in the first place and it looks to me like using (*ESC*) is adding a blank - but it makes things work at least.
You probably should also add brackets around your style definition for column1.
Below code works for me.
proc report data=test nowindows
style(header)={backgroundcolor=white fontweight=light fontsize=8pt fontfamily="Times New Roman" asis=off}
style(report)={rules=groups frame=void borderwidth=0.5pt bordercolor=black}
;
column (
("(*ESC*){style[fontfamily='Times New Roman' just=left]AAAAA}" column1)
("(*ESC*){style[borderbottomcolor=black borderbottomstyle=solid borderbottomwidth=0.5pt ]BBBBB}" column2)
("CCCCC" column3)
);
define column1 / display;
define column2 / display;
define column3 / display;
run;
Hi, Patrick-san:
Sorry for my late response.
Yes, I think so, there may be problem of (*ESC*).
I replaced (*ESC*) with escapechar="^", and resolved.
Thanks a lot for your help!
Hi, Patrick-san, All:
There may be difference of in-line formatting between style[xxxxx] and S={xxxxx}.
Using style[xxxxx], results have un-needed blanks, and using S={xxxxx}, have no un-needed blanks.
For your information.
Thanks!!
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.