Hi:
I normally create a PDF of my reports the old-fashioned way - by printing the OUTPUT Listing to pdf. I am trying to save some printing and labeling steps by automating this using ODS. However, none of the SAS styles mirror the look. ODS is completely new to me, but fascinating to learn.
Muddling my way through it by first reading something and then playing with it, I have learned how to create my own style template and, I have started to modify the existing Monospace style with partial success. I am stuck on a few items:
1-underlining the summed TVAL2
2-skipping a line between groups
3-no skipped lines (or line spacing) within a group
of lesser importance
4-changing the line under the header to be thinner and blue
5-a skipped line under the header underline
Attached are the original and my attempt at mimicking it. Here is my current code:
PROC TEMPLATE;
define style Styles.SASMonospace;
parent = styles.printer;
class fonts /
'docFont' = ("<SAS monospace>, Roman, SAS monospace",8pt)
'headingFont' = ("<SAS monospace>, Roman, SAS monospace",8pt)
'headingEmphasisFont' = ("<SAS monospace>, Roman, SAS monospace",8pt)
'FixedFont' = ("<SAS monospace>, Roman, SAS monospace",8pt)
'FixedHeadingFont' = ("<SAS monospace>, Roman, SAS monospace",8pt)
'FixedStrongFont' = ("<SAS monospace>, Roman, SAS monospace",8pt)
'FixedEmphasisFont' = ("<SAS monospace>, Roman, SAS monospace",8pt)
'EmphasisFont' = ("<SAS monospace>, Roman, SAS monospace",8pt)
'StrongFont' = ("<SAS monospace>, Roman, SAS monospace",8pt)
'TitleFont' = ("<SAS monospace>, Roman, SAS monospace",8pt)
'TitleFont2' = ("<SAS monospace>, Roman, SAS monospace",8pt)
'BatchFixedFont' = ("<SAS monospace>, Roman, SAS monospace",8pt);
class header/
backgroundcolor=white
color=Blue;
style systemtitle /
backgroundcolor=white
color=Blue;
style systemfooter /
backgroundcolor=white
color=Blue;
style body /
backgroundcolor=white
color=Black;
class table /
frame = void
rules = groups
backgroundcolor = white
borderspacing = 0pt
cellpadding = 2pt;
style allrulestable from table /
frame = void
rules = all;
end;
run;
I would appreciate any tips. Fast learner, but limited ODS knowledge. Thanks
Hi:
You cannot insert blank lines using PROC TEMPLATE, you need to do insertion of empty lines between groups in PROC REPORT code. Unfortunately, you are using LISTING only options like OL, and SKIP with PROC REPORT and those options will NOT work with ODS Destinations. There have been several postings about how options like OL, UL, DUL, DOL, HEADLINE, FLOW, etc, will not work for ODS RTF, ODS PDF and ODS HTML.
To change the borderwidth of any border lines, you typically use the borderwidth style attribute .
Here's an example of inserting empty lines between a group (AGE) and also turning on some kind of line for a summed column (HEIGHT) using just the JOURNAL style and doing overrides in PROC REPORT for colors/fonts/etc:
Hope this helps,
Cynthia
Hi:
You cannot insert blank lines using PROC TEMPLATE, you need to do insertion of empty lines between groups in PROC REPORT code. Unfortunately, you are using LISTING only options like OL, and SKIP with PROC REPORT and those options will NOT work with ODS Destinations. There have been several postings about how options like OL, UL, DUL, DOL, HEADLINE, FLOW, etc, will not work for ODS RTF, ODS PDF and ODS HTML.
To change the borderwidth of any border lines, you typically use the borderwidth style attribute .
Here's an example of inserting empty lines between a group (AGE) and also turning on some kind of line for a summed column (HEIGHT) using just the JOURNAL style and doing overrides in PROC REPORT for colors/fonts/etc:
Hope this helps,
Cynthia
Thanks Cynthia, that was all I needed. Did more tweaking and now i am happy with it. Learned a lot.
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!
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.
Ready to level-up your skills? Choose your own adventure.