BookmarkSubscribeRSS Feed
deleted_user
Not applicable
hi,
I would like to create a standard logo to appear on top left corner of page; On top righr corner of page I need this as well:
Print date: xx/yy/dddd
Page : x of y

I have tried several approaches, and I am close, but the problem is with alignment;

The alignment should be such that , the logo on left side should be about same line as the stuff on the right..
the logo on left side has much bigger font size, and it is essentially spanning two rows, while the stuff on right side has two rows but of lesser font size;

with my code, howver the stuff on right side appears to be below the logo on the left side;

here is one of my attempts;

*******************************************;
title1 "~S={just=left font_weight=bold font_style=roman font_size=16pt}COMPANYNAME~S={}~S={just=left font_size=4pt}~{super TM}~S={}~S={vjust=top just=right font_style=roman font_size=5pt font_weight=bold}
&space1 &space1 Print date:~S={vjust=top font_style=roman font_size=5pt just=right font_weight=light}&date1~S={}";

title2 "~S={vjust=top just=right font_style=roman font_size=5pt font_weight=bold} Page: ~{thispage}~S={}";


***********************************;
&space is filler to help push the stuff to right;

I have tried using proc report approach , but the issue remains same;

would appreciate any pointers...
Shankar







*************************************************;
4 REPLIES 4
David_SAS
SAS Employee
Shankar,

I recommend that you contact Technical Support at http://support.sas.com/ctx/supportform/index.jsp .

-- David Kelley, SAS
Pallav
Calcite | Level 5

Try this

ods pdf file = 'test.pdf';

ods escapechar = '^';

* Your image has to be of proper size;

* you can also make logo left or right justify;

title "^S={preimage='C:\Users\sas.jpg'}";

proc print data = sashelp.class;

run;

ods pdf close;

TG_WPAFB
Calcite | Level 5

Can you use ODS HTML TEXT / or a tagset? 

Also could you use a preHTML function on a proc report?  What is the desired output format?

ODS HTML TEXT="<DIV align=Left style='position:absolute; top:1px;'><IMG Src='Filename.jpg'></DIV>

";

PROC REPORT DATA=FINAL LS=256 STYLE(report)={prehtml="<DIV align=Left style='position:absolute; top:1px;'><IMG Src='Filename.jpg'></DIV>

" rules=none}; -Tony

Cynthia_sas
SAS Super FREQ

ODS HTML <DIV> tags will not work with PDF. The OP said PDF was the desired destination. Possibly there might be something to do with CSS -- but the bigger problem is that in a separate posting the same OP said he needed the logo to print even if the PROC generated no output -- so the logo on an empty page. Don't know whether that is still a requirement or not, but a complication.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 928 views
  • 0 likes
  • 5 in conversation