Hi all,
I'm trying to add a bottom border to the title container for my report going to the PDF destination. I'm using proc template to do this, but what I thought would work (below) is not (no borders are being produced at all).
For example:
I'd like to take this:
Title 1
Title 2
and convert it to this:
Title1
Title2
Note, I have also tried the "underline" option in the title statement, but that only works so long as you have text in the field. I want the border to span the entire width of the page, and some of my pages are in portrait and others in landscape orientation.
Sample SAS code that I've tried using:
proc template;
define style mystyle;
parent=styles.statistical;
style SysTitleandFooterContainer from SysTitleandFooterContainer/
frame=below rules=rows;
[More code below this]
Hi:
I don't think you need a style template. I followed this Tech Support note: https://support.sas.com/kb/46/383.html and got the desired results without a STYLE template:
But if you want to do it with a STYLE template, then you need a different style element. I used TitlesAndFooters in this example:
Cynthia
@frankie_b wrote:
Hi all,
I'm trying to add a bottom border to the title container for my report going to the PDF destination. I'm using proc template to do this, but what I thought would work (below) is not (no borders are being produced at all).
For example:
I'd like to take this:
Title 1
Title 2
and convert it to this:
Title1
Title2
Note, I have also tried the "underline" option in the title statement, but that only works so long as you have text in the field. I want the border to span the entire width of the page, and some of my pages are in portrait and others in landscape orientation.
Sample SAS code that I've tried using:
proc template;
define style mystyle;
parent=styles.statistical;
style SysTitleandFooterContainer from SysTitleandFooterContainer/
frame=below rules=rows;
[More code below this]
Your comment about "only works so long as you have text in the field" means that you may have issues with anything that does not have text in a Title2 field.
I think you may want to provide an actual example of what you are trying to do with an "underline" under Title2 when there is no Title2 text.
Also, what would you expect to have happen when Title3 through Title9 text appear?
When you compiled the template were there any notes or warnings?
Unfortunately the report is confidential so I can't even share the titles with you, but I'll try to describe the issue better.
I have about 20 characters of text in my title2. When I use "underline" in the title statement, it underlines those 20 characters. I'd like the line to actually extend across the entire page (not just under the text). My understanding is that I need to change the border properties of the table that is generated when it writes to PDF.
I'm not worried about the rest of the titles (i.e., title 3 through the rest), I'm only interested in title1 and title2. (technically, just changing the borders for the title2 part).
Hi:
I don't think you need a style template. I followed this Tech Support note: https://support.sas.com/kb/46/383.html and got the desired results without a STYLE template:
But if you want to do it with a STYLE template, then you need a different style element. I used TitlesAndFooters in this example:
Cynthia
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.