BookmarkSubscribeRSS Feed
KimLeBouton
Quartz | Level 8
I apologize if this question/answer has been posted before. I tried to do a search of this Forum and could not find a similar question/answer.

I have a very old PROC PRINT report that I’m branding, hopefully without a template change. I’ve tried the code following my signature, but with no luck. The Century Gothic font is applied to the title, header, and columns (a b c d e f). x & y retain the default template font.

Is there a quick way to fix x & y? I recognize that I could rewrite it in PROC REPORT and get my desired output, without a template change.

TIA,
Kim LeBouton

ods pdf file=’.pdf’ notoc uniform;
TITLE1 j=l font="Century Gothic" "&TITLe1";
TITLE2 j=l font="Century Gothic" "&TITLe2";
TITLE3 j=l font="Century Gothic" "&TITLe3. DETAIL";
TITLE4 j=l font="Century Gothic" "&TITL4";
PROC PRINT DATA=xxx N NOOBS SPLIT='*'
style(HEADER)={font_face=' Century Gothic'}
style(COLUMN)={font_face=' Century Gothic'}
style(data)={font_face=' Century Gothic'}
;
BY x y;
ID x y;
SUMBY y;
PAGEBY x;
VAR a b c d e f;
Run;
ods pdf close;
4 REPLIES 4
Cynthia_sas
Diamond | Level 26
Hi:
To fix X and Y, add style overrides to the ID statement, as shown below. I'm not sure you really need the <ttf> in the style override. My example worked without it.

cynthia
[pre]
data xxx;
set sashelp.prdsale;
where division = 'CONSUMER' and
product = 'CHAIR';
x = country;
y=region;
a=division;
b=prodtype;
c=product;
d=actual;
e=predict;
f=actual * predict / 100;
run;

proc sort data=xxx;
by x y;
run;

ods listing close;
ods pdf file='c:\temp\cent_goth.pdf' notoc uniform;
TITLE1 j=l font="Century Gothic" "Wombat";
TITLE2 j=l font="Century Gothic" "Koala";
TITLE3 j=l font="Century Gothic" "Eucalyptus DETAIL";
TITLE4 j=l font="Century Gothic" "And other stuff";
PROC PRINT DATA=xxx N NOOBS SPLIT='*'
style(HEADER)={font_face='Century Gothic'}
style(COLUMN)={font_face='Century Gothic'}
style(data)={font_face='Century Gothic'}
;
BY x y;
ID x y / style(header)={font_face='Century Gothic'}
style(data)={font_face='Century Gothic'};
SUMBY y;
PAGEBY x;
VAR a b c d e f;
Run;
ods pdf close;
[/pre]
KimLeBouton
Quartz | Level 8
Perfect--as usual.

Thanks so much,
Kim
deleted_user
Not applicable
Hi !
I'm traying to apply a "style" at the option "BY" from the PROC PRINT.
But no result !

proc print data=EDITION_MOL_MONTANT_NUL label WIDTH=UNIFORMBY
style(table)={frame=box rules=all borderwidth=1 just=left}
style(header)={just=center font_size=7 pt font_weight=Bold}
style(data)={just=center font_size=7 pt};
by CATEGORIE_LIB;
id IEP;
var PAS_PASTYP MOL_CODE_UCD MOL_DATDEB MOL_UNITE_UCD MOL_MONTANT RESDEB RESFIN / style(data)={just=center font_size=7 pt};
var UM_LIBELLE / style(data)={just=left font_size=7 pt};
label PAS_PASTYP="Statut" MOL_CODE_UCD="UCD" MOL_UNITE_UCD="Nb unités" MOL_DATDEB="Administrée le" MOL_MONTANT="Montant" RESDEB="Entrée UM" RESFIN="Sortie UM" UM_LIBELLE="UM";
run;
ArtC
Rhodochrosite | Level 12
Try the BYLABEL location on a style override option in the PROC PRINT statement.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 2061 views
  • 0 likes
  • 4 in conversation