BookmarkSubscribeRSS Feed
sheren_deep1
Calcite | Level 5

Hi, 


I need help on formatting the font style of one of the variable name on a table to be a combination of standard and italic fonts. Here is the sas codes: 

 

TITLE j=left "Jadual B1 : Jumlah penduduk mengikut kumpulan etnik, kawasan pihak berkuasa tempa'tan dan negeri, Malaysia, 2010";
Title2 font=bold italic j=left "Table   B1 : Total population by ethnic group, local authority area and state, Malaysia, 2010";
title3 " ";
title4 j=left "Negeri : NEGERI SEMBILAN";
title5 font=bold italic j=left "State";
ods escapechar='~'; 

proc tabulate data=WORK.DOSM order=data;
	where not missing(NEW_ETHNICITY);
	class DISTRICT NEW_ETHNICITY NEW_CITIZENSHIP  /Missing ;
	classlev NEW_ETHNICITY;
	CLASSLEV NEW_citizenship;
	classlev district;
	var ID;
	table ALL DISTRICT=' ', ALL NEW_ETHNICITY='Warganegara Malaysia
Malaysian citizens' ALL 
		NEW_CITIZENSHIP='Bukan Warganegara Malaysia *Non-   Malaysian citizens *' 
		/Box='Daerah Pentadbiran/Kawasan Pihak Berkuasa Tempatan (style font = italic)
										Administrative District/Local Authority Area' row=float MISSTEXT='0';
										
	keylabel N=' ';
	keylabel all='Jumlah Total';
	footnote font=arial bold j=left "Nota" font=arial bold italic "/Note";
footnote font=arial bold j=left "Nota" font=arial bold italic "/Note:";
	footnote2 j=l   f='ARIAL amt/bold' "~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_Angka-angka di atas tidak disesuaikan untuk kurang penghitungan.";
run;

And here is my output: 

 

 

 Capture.PNG

 

 

Capture.PNG

 

However I need to output to be presented this way for this particular variable (combination of standard and italic fonts) 

 

Capture.PNG

 

 

Could anyone please help me on this. 

 

Thank You. 

1 REPLY 1
RW9
Diamond | Level 26 RW9
Diamond | Level 26

You would need to use an inline format for that, set your ods escapechar:

ods escapechar="^";

Before the titles.   Then change:

'Warganegara Malaysia
^s={font_style=italic}Malaysian citizens' ALL 

Or something similar to that - I have nothing to test on right now.  You can find lots of papers on inline formatting:
http://www2.sas.com/proceedings/forum2007/144-2007.pdf

For example.

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
  • 1 reply
  • 1037 views
  • 0 likes
  • 2 in conversation