I'd like to indent some words when generate html files. For instance, there is column aecat as below shows:
data abc;
set a;
if aedecod ='' then aecat=aesoc;
else aecat="(*ESC*){unicode 007C}"||strip(aedecod);
run;
ods html file='xxxx/a.html';
proc report data=abc nowd;
column aecat;
define aecat/display;
run;
ods html close;
However, the unicode doesn't work. Could anybody help me? Thank you.
Try this:
data abc;
set a;
if aedecod = ''
then aecat = aesoc;
else aecat = " " || strip(aedecod);
run;
ods html file='xxxx/a.html';
proc report data=abc nowd;
column aecat;
define aecat/display style(column)={asis=on};
run;
ods html close;
Idea taken from https://communities.sas.com/t5/ODS-and-Base-Reporting/Preserve-Leading-Blanks-in-ODS-Output/td-p/193..., which is the first hit of a google search (Maxim 6) for "leading blanks in proc report".
Hi:
This previous posting showed one technique for RTF and PDF:
https://communities.sas.com/t5/SAS-Programming/Proc-report-help/td-p/327126
The only difference is that for HTML, you need to use INDENT= instead of LEFTMARGIN=, as shown below:
Cynthia
Hi KurtBremser, thank you for your advice. Yes, it can indent by this way. However, the outcome appearance is not good: there are unnecessary frame for the indent words.(already highlighted as yellow)
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: