BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Amanda_
Calcite | Level 5

I've been going back and forth about this problem and I haven't been able to figure out a solution.

I have a multi-page report and I need footnotes on all of the pages with #BYVAL1 in them.

On the first page I have paragraphs of text & #BYVAL's within.

I know I can do this with titles but I do not want the titles to repeat on any pages after the first one.

I found a possible workaround for the titles to suppress after page 1 but my footnote on the first page did not display the #BYVAL1.

http://listserv.uga.edu/cgi-bin/wa?A2=ind0912a&L=sas-l&H=1&P=7883

I tried ODS RTF TEXT = " text is here #BYVAL2 and here. ^2n More text here";

That didn't work and I couldn't find papers that showed me how to get a variable in the text.

Any suggestions on how I should approach this? Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  That syntax shown in your link for the DATA step is still pre-production. I'm not sure that the techniques illustrated work as you expect for footnotes. Also, the syntax could have changed between SAS 9.3 and when that suggestion was posted. #BYVAL doesn't work with ODS TEXT=. It makes sense if you think about it. BY statements work within one procedure and how it processes data. But, the ODS TEXT= statement sits "outside" any single procedure call.

  You could "macroize" your program to do each BY group separately, which would allow you to still use #BYVAL for each  footnote and/or change the title for each BY group, using %IF conditional logic. Look on page 6 of this paper to see the SORTANDPRINT macro program for some idea of how macro variables can be  used in the TITLE statement:

http://www2.sas.com/proceedings/sugi29/243-29.pdf

You'd only need to add a bit of code to get a BY statement and and #BYVAL info working in  the macro program.

cynthia

View solution in original post

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  That syntax shown in your link for the DATA step is still pre-production. I'm not sure that the techniques illustrated work as you expect for footnotes. Also, the syntax could have changed between SAS 9.3 and when that suggestion was posted. #BYVAL doesn't work with ODS TEXT=. It makes sense if you think about it. BY statements work within one procedure and how it processes data. But, the ODS TEXT= statement sits "outside" any single procedure call.

  You could "macroize" your program to do each BY group separately, which would allow you to still use #BYVAL for each  footnote and/or change the title for each BY group, using %IF conditional logic. Look on page 6 of this paper to see the SORTANDPRINT macro program for some idea of how macro variables can be  used in the TITLE statement:

http://www2.sas.com/proceedings/sugi29/243-29.pdf

You'd only need to add a bit of code to get a BY statement and and #BYVAL info working in  the macro program.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1301 views
  • 1 like
  • 2 in conversation