Hello,
The assignment I am working on is to convert reports in TPL to SAS, which I did;
The problem is that the requirements indicate that the developers MUST use proportional fonts to look just like the reports in TPL.
Everything looks fine except one column in the report;
The column is character field containing "name of the each state" and "dots (.)" to fill in blank.
I am using proc report to generate the report;
attached files are my sas code and results PDF files: one with Arial/ one with SAS monospace.
the problem area in sas code is that "COMPUTE T1_STCNTY_NAME". I created dynamic format to fulfill the requirements, but with Font Arial, it is so hard to meet the requirements.
Your suggestions, ideas, or tips would greatly be appreciated.
Thanks.
Hana
Hi:
The issue is the font, not the code. here's why:
2 text strings, 10 letters, followed by 10 periods/dot
Arial 14pt
wwwwwwwwww..........
iiiiiiiiii..........
Courier New 14pt
wwwwwwwwww..........
iiiiiiiiii..........
Helvetica 14pt
wwwwwwwwww..........
iiiiiiiiii..........
Terminal 14pt
wwwwwwwwww..........
iiiiiiiiii..........
As you can see, the "proportional space fonts", like Arial and Helvetica do not "line up" because the letter w takes up more space horizontally than the letter i, therefore, the dots do not line up either. However, with the "fixed pitch" or "monospace" fonts, like Courier New or Terminal, the letter w and the letter i take up the same amount of horizontal space, so the dots "line up". Notice how Courier and Terminal are slightly different from each other.
If your requirement is to use Arial or any proportional font and have the dots "line up" , then I fear you have been set an impossible task. You will have to use a font like Courier New or Terminal or SAS Monospace for your report.
I am not sure I understand the requirement, entirely. TPL (Table Producing Language) is like PROC TABULATE and to some extent, like PROC REPORT, in that you can use TPL to produce cross-tabular tables. When I worked with TPL, it created output printed on a line printer that used a fixed pitch or monospace font (not a proportional font). So I am not sure that you can replicate that look without using Courier New.
I am teaching and not able to run code. I would suggest that you work with Tech Support, but they really can't change the fundamental behavior of proportional spaced fonts. ODS does have some style attributes that would achieve indenting (such as you used to do with TPL), perhaps those will help. But if your purpose with the dots is to make them line up in a proportional font, I think you are not going to have success.
cynthia
Ms. Cynthia,
Thank you so much for your explanation; it is a GREAT help!
Sincerely,
Hyunjoo Reed
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: