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

I have attached a document showing the output that I get as well as a code snippit.  I can't seem to get the Logo to center in the report header.  Seems like I should be using a Just=center pr something but can't seem to grok it.

Thanks for any help that you may be able to offer.

-d

1 ACCEPTED SOLUTION

Accepted Solutions
KarlK
Fluorite | Level 6

Can you put your graphic in title1 and move the rest of your titles down 1, as opposed to ODS TEXT? The reason I ask is that I do the sort of thing below all the time, and my image is centered above the 1st title (in this case, title2):

title j=c '^{style [preimage="&gHomeDir.Cetus_logo.jpg"]}';

title2 "Another title";

Karl

View solution in original post

5 REPLIES 5
Reeza
Super User

Not sure if this is useful...or correct.

The docs say you need to modify the template, though I prefer modifying my CSS style sheet. The drawback to this method is wherever you use a ODS TEXT= will have the same format.

SAS 9.2 Docs

The following example uses a single ODS TEXT= statement to add text to PDF, HTML, and traditional RTF output. PROC TEMPLATE modifies the UserText style element which controls the font style, font color, and other attributes of the text that the ODS TEXT= statement adds.

KarlK
Fluorite | Level 6

Can you put your graphic in title1 and move the rest of your titles down 1, as opposed to ODS TEXT? The reason I ask is that I do the sort of thing below all the time, and my image is centered above the 1st title (in this case, title2):

title j=c '^{style [preimage="&gHomeDir.Cetus_logo.jpg"]}';

title2 "Another title";

Karl

Dick_Shryock
Calcite | Level 5

Thanks this does the trick

KarlK
Fluorite | Level 6

Great, glad to hear it. By the way, in my example, I have "j=c" in the title line with the graphic. You probably don't need that. I realize now that I took this example from some existing code which used a style with left-aligned titles. Under normal circumstances, your titles (included preimaged graphics) will be centered by default.

Just an FYI.

Karl

Reeza
Super User

To modify the style sheet use EG Style manager.

The value you're looking to change is User Text and alignment to center.

I'm assuming you're within EG based on the code provided so that should work easily enough.

I'd advice saving a copy of the template and use that instead of making modifications to the default template.

SAS Innovate 2025: Register Now

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!

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
  • 5 replies
  • 1643 views
  • 0 likes
  • 3 in conversation