SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
mgorripati
Obsidian | Level 7

Can someone explain  how to add  Leading Blank spaces to Title Statement   while left justifying the Title.

 

Thanks,

MG

6 REPLIES 6
Cynthia_sas
SAS Super FREQ

Hi:
The answer will depend on your destination of interest (HTML, PDF, RTF)? Why do you need leading spaces if you are left-justifying the title (just curious).

cynthia

 

Here's an example for the 3 primary destinations:

undefined

mgorripati
Obsidian | Level 7

Cynthia,  thanks for the response  and sorry for not providing complete deltails.

 

I want to add few Leading blank spaces to the Title in my excel report generated by PROC REPORT using tagsets.ExcelXP.

 

TITLE  J=LEFT "           " "Total  Members = &client_cnt";

 

I want the Total Members to be displayed starting from 2nd or 3rd column . providing space in TITLE statment  is not working when i am left justifying it .

 

Thanks,

MG

Cynthia_sas
SAS Super FREQ
Hi:
I am not sure that TAGSETS.EXCELXP will use the ESCAPECHAR and {NBSPACE} technique that works with other destinations. You might need to work with Tech Support on this. I think that once you are in Excel, you can indent a cell, but I am not sure you can insert leading spaces and have Excel use the leading spaces when opening the file.

cynthia
ballardw
Super User

A possibly confusing approach might be to try null characters (ASCII 255). You often can type them into the editor by holding down the alt key and then use the NUMERIC key pad to type 255 and release the alt key (for each character). What gets seen may depend on the active font but mostly it looks like a space and generally doesn't get stripped like a space does.

 

 

Ksharp
Super User
Can you just add some TAB characters before it ?


TITLE " '09'x   '09'x  '09'x  '09'x    xxxxxxxx";

svil
Calcite | Level 5

Adding TAB characters works excellent. Thank you!!!

 

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 5291 views
  • 1 like
  • 5 in conversation