Hello
In this example I create multiple prints (by group)
I have 1 questions:
1-I want to have empty line between the print outputs
When I do copy and paste it into excel the prints are all connected and I want to have empty line between outputs
2-I want to color value under PCT column in last row of each print:
IF value>39% then it will have red background color.
IF value<=39% then it will have green background color.
data aaa;
input ID group $ Y;
cards;
1 a 10
2 a 20
3 a 30
4 a 40
5 b 50
6 b 60
7 b 70
8 c 80
9 c 90
10 c 100
;
run;
data bbb;
set aaa;
by group;
if first.group then total=0;
total + y;
PCT=y/total;
format PCT percent9.2;
run;
title;
proc print data=bbb noobs;
by group;
id group;
run;
Try
title1 'My Title';
proc print data=bbb noobs;
by group;
id group;
run;
footnote1 ' E - N - D ';
footnote2 ' ';
You can add FOOTNOTEs in order to have space between IDs.
I tried to use footnote but I don't see any difference
title;
proc print data=bbb noobs;
by group;
id group;
footnote;
run;
Try
title1 'My Title';
proc print data=bbb noobs;
by group;
id group;
run;
footnote1 ' E - N - D ';
footnote2 ' ';
You will have to change the template used to increase the space between tables. Depending on the output-format you are using, using CSS can help - i never did it, so this is just how i would try to solve the problem.
There are so many papers about how to change background color of cells and rows, i am sure you can find examples.
EDIT: The title; statement resets all title-statements executed before. The footnote; has the same effect on footnotes.
Thank you so much.
I see that for example IF I want to have 3 lines of space between the printed tables then I need to have 3 footnote statements.
for example:
footnote;
footnote1 ' ';
footnote2 ' ';
footnote3 ' ';
title;
title1 'XXXXXX';
proc print data=sashelp.cars(where=(Type="SUV")) noobs;run;
title;
title1 'YYYY';
proc print data=sashelp.cars(where=(Type="SUV")) noobs;run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.