BookmarkSubscribeRSS Feed
KimLeBouton
Quartz | Level 8
Using the “Writing a Customized Summary on Each Page” from http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a002473656.htm, how would I remove the box around the compute blocks and lines statements when writing a PDF file? I’m still using SAS 9.13.

Using ODS markup, I know that the Style Element is NOTECONTENT:
STYLE NoteContent /
;

I attempted the following but it didn’t work:

proc template;
define style styles.nonotes;
parent=styles.default;
style NoteContent /
frame=void
rules=none
;
end;
run;

As you can probably guess, I’m trying to create more than 10 footnotes and the border makes the report look weird.

The code follows my signature.

TIA,
Kim LeBouton

proc format /*library=proclib*/;
value $sctrfmt 'se' = 'Southeast'
'ne' = 'Northeast'
'nw' = 'Northwest'
'sw' = 'Southwest';

value $mgrfmt '1' = 'Smith' '2' = 'Jones'
'3' = 'Reveiz' '4' = 'Brown'
'5' = 'Taylor' '6' = 'Adams'
'7' = 'Alomar' '8' = 'Andrews'
'9' = 'Pelfrey';

value $deptfmt 'np1' = 'Paper'
'np2' = 'Canned'
'p1' = 'Meat/Dairy'
'p2' = 'Produce';
run;

data grocery;
input Sector $ Manager $ Department $ Sales @@;
datalines;
se 1 np1 50 se 1 p1 100 se 1 np2 120 se 1 p2 80
se 2 np1 40 se 2 p1 300 se 2 np2 220 se 2 p2 70
nw 3 np1 60 nw 3 p1 600 nw 3 np2 420 nw 3 p2 30
nw 4 np1 45 nw 4 p1 250 nw 4 np2 230 nw 4 p2 73
nw 9 np1 45 nw 9 p1 205 nw 9 np2 420 nw 9 p2 76
sw 5 np1 53 sw 5 p1 130 sw 5 np2 120 sw 5 p2 50
sw 6 np1 40 sw 6 p1 350 sw 6 np2 225 sw 6 p2 80
ne 7 np1 90 ne 7 p1 190 ne 7 np2 420 ne 7 p2 86
ne 8 np1 200 ne 8 p1 300 ne 8 np2 420 ne 8 p2 125
;
run;

/*libname proclib 'SAS-data-library';*/

options nodate pageno=1 /*linesize=64 pagesize=30
fmtsearch=(proclib)*/;
ods listing close;
ods html close;
ods pdf file='c:\test to remove box';

proc report data=grocery nowd
headline headskip;

title 'Sales for Individual Stores';

column sector manager department sales Profit;

define sector / group noprint;
define manager / group noprint;
define profit / computed format=dollar11.2;
define sales / analysis sum format=dollar11.2;
define department / group format=$deptfmt.;

compute profit;
if department='np1' or department='np2'
then profit=0.4*sales.sum;
else profit=0.25*sales.sum;
endcomp;

compute before _page_ / left;
line sector $sctrfmt. ' Sector';
line 'Store managed by ' manager $mgrfmt.;
line ' ';
line ' ';
line ' ';
endcomp;

break after manager / ol summarize page;

compute after manager;

length text $ 35;

if sales.sum lt 500 then
text='Sales are below the target region.';
else if sales.sum ge 500 and sales.sum lt 1000 then
text='Sales are in the target region.';
else if sales.sum ge 1000 then
text='Sales exceeded goal!';
line ' ';
line text $35.;
endcomp;
run;
ods pdf close;
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
You could try this. I'm not entirely sure that it will work in SAS 9.1.3. It worked for me in 9.2. I can't remember when the bordertopcolor, borderbottomcolor,etc got implemented:
[pre]
compute after manager /
style={bordertopcolor=black borderrightcolor=white
borderleftcolor=white borderbottomcolor=white};
[/pre]

A different approach which will get you more than 10 titles or footnotes is an ODS ESCAPECHAR approach:
[pre]
ods escapechar='~';
footnote1 'one ~1n extra';
footnote2 'two ~1n extra';
footnote3 'three ~1n extra';
footnote4 'four ~1n extra';
footnote5 'five ~1n extra';
footnote6 'six ~1n extra';
footnote7 'seven ~1n extra';
footnote8 'eight ~1n extra';
footnote9 'nine ~1n extra';
footnote10 'ten ~1n extra';
[/pre]

The ESCAPECHAR, in this case, is the tilde (~) and the tilde + 1n (~1n) will give you a line feed character. So essentially, you have 20 footnote lines here (PDF) ... and will also work for RTF and HTML.

cynthia
KimLeBouton
Quartz | Level 8
SAS 9.13 doesn't support the first suggestion. It didn't produce any errors in the log, but it didn't work. After I tried the code, I decided to search SAS 9.13 documentation and didn't find anything. Another reason why I need to get a copy of SAS 9.2! ;->

The escape character and footnotes will work. Thanks so much.

Kim

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 1425 views
  • 0 likes
  • 2 in conversation