BookmarkSubscribeRSS Feed
supp
Pyrite | Level 9

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:

output.jpg

 

4 REPLIES 4
data_null__
Jade | Level 19

 

LSPACE=line-space <units>

specifies the amount of spacing above and below lines of text.

 

 

supp
Pyrite | Level 9

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";

Cynthia_sas
SAS Super FREQ

Hi:

  When I use "regular" ODS HTML, ODS PDF and ODS RTF with the following code:

code_used_lspace.png

 

I see that 3 of the destinations show the use of LSPACE= -- here's the output for that code:

use_lspace.png

 

But, the odd man out is MSOFFICE2K destination as shown below:

lspace_msoffice2k_not.png

 

 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

Ksharp
Super User

Try use ODS TEXT='xxxxxxx'  to replace TITLE .

 

ods escapechar='~' ;

ods text='xxxxxx  ~n yyyyy';

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 4 replies
  • 2504 views
  • 1 like
  • 4 in conversation