Data visualization with SAS programming

Display value of BY variable in ENTRYFOOTNOTE.

Reply
Respected Advisor
Posts: 3,775

Display value of BY variable in ENTRYFOOTNOTE.

My BY variable is PAGE and I want to display Page 1, Page 2 etc. using and ENTRYFOOTNOTE.

 

I tried this which compiles

entryfootnote halign=right textattrs=(style=normal size=_footnotefontsize) eval(put("Page "||put(page,1.)||" of 2",$12.));

but generates the following NOTE and no output.

 

An expression used in a text statement resolves to a column. It must resolve to a constant. The expression will be ignored.

Super Contributor
Posts: 252

Re: Display value of BY variable in ENTRYFOOTNOTE.

Hi, 

Simplifying it, you can you _byval_ to output the page number, you also need to add _byval_ to the dynamic statement too.

 

Of the top of my head, this may work:

entryfootnote halign=right textattrs=(style=normal size=_footnotefontsize) "Page " _byval_ " of 2";

 

 

Esteemed Advisor
Esteemed Advisor
Posts: 7,203

Re: Display value of BY variable in ENTRYFOOTNOTE.

This bit:

eval(put("Page "||put(page,1.)||" of 2",$12.));

 

Does not look right to me, the put() function takes characters and makes numbers, but in the above it is putting text to text?  Have you tried:

eval(cat("Page ",put(page,1.)," of 2");

Ask a Question
Discussion stats
  • 2 replies
  • 200 views
  • 0 likes
  • 3 in conversation