BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Daily1
Quartz | Level 8

i have 

footnote2 " NOTE :1) < 100 -WHITE,
2) between 100 to 200 --PINK,
3) above 200 ---RED";

 

i want Footnote with text box and background color

 

Daily1_0-1704274515170.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
data have;
input (a b c d) ($80.);
cards;
NOTE:
1) < 100 -WHITE
2) between 100 to 200 --PINK
3) above 200 ---RED
;


ods excel file='c:\temp\temp.xlsx' options(sheet_interval='none') ;
proc report data=sashelp.class nowd;
run;

proc report data=have nowd noheader ;
column a b c d;
define b/style={bordercolor=black borderwidth=2};
define c/style={bordercolor=black borderwidth=2 background=pink};
define d/style={bordercolor=black borderwidth=2 background=red};
run;
ods excel close;

Ksharp_0-1704345418344.png

 

View solution in original post

4 REPLIES 4
yabwon
Amethyst | Level 16

According to the documentation and tests I did for one footnote it's possible to have only one background colour and multiple text colours. You can consider creating separated footnotes too. See the code snippet below.

 

Bart

 

ods pdf file="R:\test1.pdf"; 
title "Some title";
footnote1 "Some text";
footnote2 
bcolor=lightgrey "NOTE:" 
color=white "1) < 100 -WHITE,"
color=pink "2) between 100 to 200 --PINK,"
color=red "3) above 200 ---RED"
;

proc print data=sashelp.class(obs=7);
run;



ods _all_ close;
ods pdf file="R:\test2.pdf"; 
ods excel file="R:\test2.xlsx" 
options(
  EMBEDDED_FOOTNOTES="ON"
  EMBEDDED_TITLES="ON"
);
title "Some title";
footnote1 "Some text";
footnote2 bcolor=white"NOTE: 1) < 100 -WHITE,";
footnote3 bcolor=pink "2) between 100 to 200 --PINK,";
footnote4 bcolor=red "3) above 200 ---RED";
;

proc print data=sashelp.class(obs=7);
run;

ods excel close;
ods pdf close;
_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Daily1
Quartz | Level 8

I am using Proc Report, and I want footnotes to appear side by side .

Do you have any other possible suggestions, please?

 

Daily1_1-1704283058114.png

 

 

 

 

ballardw
Super User

Provide example data and full code for your current report.

Something like this may be possible with a Break or Rbreak.

Ksharp
Super User
data have;
input (a b c d) ($80.);
cards;
NOTE:
1) < 100 -WHITE
2) between 100 to 200 --PINK
3) above 200 ---RED
;


ods excel file='c:\temp\temp.xlsx' options(sheet_interval='none') ;
proc report data=sashelp.class nowd;
run;

proc report data=have nowd noheader ;
column a b c d;
define b/style={bordercolor=black borderwidth=2};
define c/style={bordercolor=black borderwidth=2 background=pink};
define d/style={bordercolor=black borderwidth=2 background=red};
run;
ods excel close;

Ksharp_0-1704345418344.png

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1741 views
  • 2 likes
  • 4 in conversation