I am producing a summary report that gets put into an email. We primarily use Outlook for our email. The summaries look pretty good but there is a large gap between the first and second titles. How do I reduce the gap between titles? For example, when I run this code:
/** get email ready **/
filename email email
from = "from email"
to = ("to_email")
subject = "Test"
type ="text/html";
/** Clean up report **/
proc template;
define style styles.myexcel;
parent=styles.excel;
class body / backgroundcolor=_undef_;
class systemtitle / backgroundcolor=_undef_;
class paragraph / backgroundcolor=_undef_;
end;
run;
ods _all_ close;
ods msoffice2k
style = myexcel
body = email;
proc report data = sashelp.cars(obs=10) nowd
style(header) = {color = white
background = #003C71}
style(report) = {just = left
bordercollapse = collapse};
title1 justify=left bold h=12pt "Title 1";
title2 justify=left bold h=10pt "Title 2";
columns make model type;
define make / display "Make";
define model / display "Model";
define type / display "Type";
run;
ods msoffice2k close;
I get this output:
LSPACE=line-space <units>
specifies the amount of spacing above and below lines of text.
Thanks for the suggestion @data_null__ . I played around with adding the LSPACE option in the title statement but I can't get the gap to be smaller. I can make the font bigger but I can't shrink the gap. Here is an example of how I applied the option:
title1 justify=left bold h=12pt lspace=2pt wrap "Title 1";
title2 justify=left bold h=10pt lspace=2pt wrap"Title 2";
Hi:
When I use "regular" ODS HTML, ODS PDF and ODS RTF with the following code:
I see that 3 of the destinations show the use of LSPACE= -- here's the output for that code:
But, the odd man out is MSOFFICE2K destination as shown below:
The browser does NOT seem to render MSOFFICE2K output created with LSPACE the same way the other destinations do. My guess is that this is a function of the Microsoft HTML spec that is used for MSOFFICE2K output. But you'd have to check with Tech Support to be sure.
My recommendation would be to try a different destination for your output, like regular ODS HTML or ODS PDF.
Cynthia
Try use ODS TEXT='xxxxxxx' to replace TITLE .
ods escapechar='~' ;
ods text='xxxxxx ~n yyyyy';
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
Explore Now →SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.