The SAS Output Delivery System and reporting techniques

Add image to PROC Report

Reply
N/A
Posts: 0

Add image to PROC Report

I am trying to insert a jpeg at the top of my report. I also would like a text under neath it. I have tried several ways with no success.

I tried this...
proc report data=CanxPctCnt nowd split='#' center
style={preimage='D:\Documents and Settings\amrapon\Desktop\Harley Davidson Report\Harley Logo For Top Of Report.jpg'};
title2 'Dealer: 0415';

I get the image, but then the tile appears above it. I would like it below the image.
SAS Super FREQ
Posts: 8,861

Re: Add image to PROC Report

Posted in reply to deleted_user
Hi:
Look at this Tech Support note -- even though it shows ODS PDF, the technique will work for ODS RTF or ODS HTML:
http://support.sas.com/kb/24/229.html

Using your method, the SAS title will come first, then the table, with the preimage before the table. The title ALWAYS comes first. So if you want the image and then the title, you'd have to move your PREIMAGE specification from the PROC REPORT step and into the TITLE statement and then whatever other text you want into the TITLE2 statement.

The ONLY thing you'll have to be careful of is that for RTF and PDF, the image location is the image file path when the RTF or PDF file is CREATED; whereas, for HTML, the image location that you specify is the image file path that will be needed when the HTML file is -LOADED- into the browser. Sometimes these are different locations...for example, the RTF and PDF location might be a local computer location, while the HTML location might be a web server location (such as where the HTML file and image will be stored when the HTML file is accessed).

cynthia
N/A
Posts: 0

Re: Add image to PROC Report

Posted in reply to Cynthia_sas
Ok, that worked for the titles! Thanks. But how come when I add the footnote, it causes the following error?....

options nodate nonumber;
ods pdf file="C:\PC_SAS\TEST FORMATTING.pdf";
ods escapechar='^';

proc report data=CanxPctCnt nowd split='#' center;
title
j=c '^S={preimage="D:\Documents and Settings\amrapon\Desktop\Harley Davidson Report\Harley Logo For Top Of Report.jpg"}'
j=c 'Dealer: 0415';
footnote1 j=r 'Page ^{thispage} of ^{lastpage}';


ERROR: No logical assign for filename .
ERROR: Internal error on replay for "page i of n" processing. Could be caused by out of memory,
out of disk space, or internal coding error. Check for other error messages above
indicating probable user error or resource constraints; if there are none, or if they make
no sense, please report this message and provide a test program to SAS Institute.
SAS Super FREQ
Posts: 8,861

Re: Add image to PROC Report

Posted in reply to deleted_user
Hi:
I believe you're running into this situation:
http://support.sas.com/kb/15/541.html

If you are working in SAS 9.2 and still encounter this issue, then you should work with Tech Support.

cynthia
Ask a Question
Discussion stats
  • 3 replies
  • 1524 views
  • 0 likes
  • 2 in conversation