BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
frankie_b
Fluorite | Level 6

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]

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

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:

Cynthia_sas_0-1620061053917.png

 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_sas_1-1620063204111.png

 

Cynthia

 

 

View solution in original post

4 REPLIES 4
ballardw
Super User

@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?

frankie_b
Fluorite | Level 6

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).

Cynthia_sas
SAS Super FREQ

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:

Cynthia_sas_0-1620061053917.png

 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_sas_1-1620063204111.png

 

Cynthia

 

 

frankie_b
Fluorite | Level 6
Thanks Cynthia, this worked!

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
  • 4 replies
  • 833 views
  • 1 like
  • 3 in conversation