BookmarkSubscribeRSS Feed
JohnChen_TW
Quartz | Level 8

Hi everyone,

 

I found the Proc Template I used in SAS 9.3 seems not work on SAS 9.4. The right side of titles and footers in PDF output would be truncated.

Below is my code:

proc template;
define style Styles.mystyle;
parent = styles.Printer;
replace fonts /
'TitleFont2' = ("Courier New",9pt,Bold Italic)
'TitleFont' = ("Courier New",9pt,Bold Italic)
'StrongFont' = ("Courier New",9pt,Bold)
'EmphasisFont' = ("Courier New",9pt, Bold)
'FixedEmphasisFont' = ("Courier New",9pt,Bold)
'FixedStrongFont' = ("Courier New",9pt,Bold)
'FixedHeadingFont' = ("Courier New",9pt,Bold)
'BatchFixedFont' = ("Courier New",9pt,Bold)
'FixedFont' = ("Courier New",9pt,Bold)
'headingEmphasisFont' = ("Courier New",9pt,Bold )
'headingFont' = ("Courier New",9pt,Bold)
'docFont' = ("Courier New",9pt)
'footFont' =  ("Courier New",9pt,Bold Italic);
replace GraphFonts /
'GraphDataFont' = ("Courier New",9pt)
'GraphValueFont' = ("Courier New",9pt)
'GraphLabelFont' = ("Courier New",9pt,Bold)
'GraphFootnoteFont' = ("Courier New",9pt,Bold)
'GraphTitleFont' = ("Courier New",9pt,Bold);
replace color_list /
'link' = blue
'bgH' = Lightgrey
'fg' = black
'bg' = _undef_;


replace Table from Output /
background = _undef_
frame = hsides
rules = groups
vjust = M
cellpadding = 1pt
cellspacing = 0.25pt
borderwidth = 0.25pt;
replace SystemFooter from TitlesAndFooters /
just = L
font = fonts('docFont');
end;
run;
options nodate nonumber papersize=A4 topmargin="0.75in"  leftmargin="0.375in" bottommargin="0.375in" rightmargin="0.375in" orientation=landscape;

ods escapechar='~'; footnote3 j=l;footnote4 j=l;
ods proclabel="Report: xxx";
ods document name=WORK.CONTENTS(write);

title1 j=l "~S={leftmargin=0in} Study: xxx"  j=r "Report: xxx, Page ~{thispage} of ~{lastpage}";
title2 j=r "~S={leftmargin=0in} Date: &sysdate9.";
title3 " ";

In the attached table, you can find that the right side of title1 and footnote are truncated, but title2 is shown correctly.

 

Does anyone have idea on this?

looking forward for any suggestions!

1 REPLY 1
JosvanderVelden
SAS Super FREQ

I used your code and ran a test on SAS OnDemand for Academics (ODA).
I don't see the issue there. Can you try to run your code on ODA and verify the results?

See attached pdf.


Best regards, Jos

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 1299 views
  • 0 likes
  • 2 in conversation