Data visualization with SAS programming

NEWLINE FUNCTION NOT DEFINED IN THIS TAGSET

Reply
Contributor
Posts: 23

NEWLINE FUNCTION NOT DEFINED IN THIS TAGSET

Hi all,

I'm trying to use the ODS escape character to dynamically insert a line break in the footnote of a SGPLOT chart that I'm outputting to a PDF. However, whenever I try to use "^n" (with "^" being my escape character) I get the error/warning/note in the subject line. I've tried adding "^n" to the footnote statement manuall, as well as via a macro variable.

Googling this error note didn't return anything interesting, nor did searching through the SAS help files. The relevant SAS code is below, with the "^n" in question near the end. If anyone has any suggestions on how to get this done, or knows whether or not it can be done at all, it would be much appreciated. I've been able to use other ODS tags via the escape character without issue, as you can see from the code below.

ods pdf file = "Test.pdf" BOOKMARKLIST = HIDE DPI = 300 PDFTOC = 1 UNIFORM ;

ods graphics on / reset border=OFF width=11in noscale height=8.5in ;

ods html close; ods escapechar = '^'; ods noproctitle;

title font=Times

    justify=LEFT "2014 Final Report"

    justify=RIGHT "^S={font_weight=bold}&RegionVar.^S={}"

    ;

ods proclabel = "&ChartName.";

title2 font=Times "^S={font_weight=bold}&ChartName.^S={} (Score = ^S={font_weight=bold}&ScoreVar.^S={})";

proc sgplot data=&RegionVar.5 NOAUTOLEGEND NOCYCLEATTRS UNIFORM=ALL dattrmap=RegionAttrs description = "&ChartName. (&ScoreVar.)" ;

highlow x = SourceVar high = UCLMIndiv low = LCLMIndiv / close = PredValIndiv open = PredValIndiv type = bar group = SourceNum attrid = SourceValID barwidth = 1

    highlabel = LabelVal name = "main" labelattrs = (family=Times size=10pt weight=bold) lineattrs = (pattern=Solid thickness=2) ;

xaxis display = (nolabel) DISCRETEORDER = DATA fitpolicy = STAGGER valueattrs = (family=Times weight=bold) labelattrs = (family=Times) ;

yaxis values = (&ChartLow. to &ChartHigh. by 5) valueattrs = (family=Times) labelattrs = (family=Times) ;

where IDNum = &ChartID. ;

footnote font=Times height=8pt

    justify=LEFT "CONFIDENTIAL"

    justify=RIGHT "%sysfunc(left(%qsysfunc(date(),worddate18.)))"

    ;

%if "&MissingValFlag."="Y" %then %do;

     footnote2 font=Times height=8pt

     justify=CENTER height=8pt BOLD "MISSING VALUES(S): ^n &MissingValVar.." ;

    %end;

     ;

run;

Post a Question
Discussion Stats
  • 0 replies
  • 329 views
  • 0 likes
  • 1 in conversation