The SAS Output Delivery System and reporting techniques

another questions on ods rtf

Not applicable
Posts: 0

another questions on ods rtf

I have again ( i am sorry :-) ) another question :
i have this code :

data example;

ods rtf file="C:\Documents and Settings\All Users\Documents\image2.rtf" bodytitle startpage=no;
ods escapechar="^";
title j=c "^S={preimage='C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\winter.jpg'}";

proc report data=example missing nowindows ;

column third second,( analisys number);
define third / group 'third';
define second / display across 'second';
define analisys /analysis '' ;
define number / analysis '';

rbreak after / summarize;

ods rtf close;

but the image and the table are separated by one blank line.
so i want to know how can i control it ?
what can i do if i want that my picture and my table are not separated (without a blank line ) ?
and what i have to do to have 5 blanks lines instead of only one ?
and if i want that my picture and the top of the sheet are spaced by 5 blanks lines
how can i do without using the proc template ?
(because i fear that if i define a proc template with a topmargin of 5 cm to quote an example and that my report is 10 pages long and that i want a top margin of 5 cm only with the page with the picture it won't be OK ....)
Posts: 9,370

Re: another questions on ods rtf

Posted in reply to deleted_user
Reducing the space between the title and the table is harder than increasing the space. Here are some methods to increase the space (used a shorter path and image name in the code):

-- You can use ODS ESCAPECHAR to insert line breaks or carriage returns between the picture and the table. For example, you already set ODS ESCAPECHAR to '^' -- and use the ESCAPECHAR to set the preimage value. if you specified ^n, then that sequence means "line feed" or "carriage return". If you specifed ^_ (Escapechar+underscore) than that would insert a non-breaking space into the line or text.

So, for example this title statement:
ods rtf file="C:\temp\image2.rtf" bodytitle startpage=no;
ods escapechar="^";
title j=c "^S={preimage='C:\temp\blue_frog.jpg'} ^n^_^n^_^n^_^n^_^n";

would insert 5 line feeds and a non-breaking space on every line between the title line and the table. Then if you changed your style to affect the margins of the document, you wouldn't have to worry about setting a different margin for page 1.

You could also use this technique to get a few lines above the image and lines below as well:
title1 " ";
title2 " ";
title3 j=c "^S={preimage='C:\temp\blue_frog.jpg'}";
title4 " ";
title5 " ";

To REDUCE the space between the image and the table, you'd have to investigate the PARSKIP style element that is coming for SAS 9.2 -- it says on this web site
that using the new "measured" RTF in SAS 9.2 will give you a way to change the font of the paragraph spacing -- thus setting a small font would reduce the space.
Note in the example that TAGSETS.RTF is being used. This is the new "measured" RTF destination that generates a slightly different set of RTF control strings for the RTF document. I do not know whether the PARSKIP element will work with "classic" ODS RTF. But at any rate, it's coming in 9.2 and not of much help to you now.

For more help with your style template for RTF or style element overrides, you might consider contacting Tech Support.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation