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
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
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.
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
Thanks this does the trick
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
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.
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.