The SAS Output Delivery System and reporting techniques

Proc report - print spaces when be

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Proc report - print spaces when be

I have a field that may or may not have spaces at the beginning. When I use the proc report to format a report, the leading spaces are suppressed. What to do for the spaces are printed?

This is the example:

a) proc report data=facturas2(where=(comp='011') drop=cod_linha) nowindows COLWIDTH=131 missing

   style(report)=[rules=none frame=void fontsize=8pt outputwidth=100%]

   style(lines)=[font=("Courier New", 8pt)];

   column linha1;

   define linha1 / "" width=124 format=$124. style=[font=("Courier New", 7pt)  cellheight=1pt];

   quit;

b) data

     linha1 - "     Department" with 5 spaces at the beginning

     linha1 - "          Unit" with 10 spaces at the beginning

c) Current report

     Department

     Unit

Any help or hints are appreciated.


Accepted Solutions
Solution
‎02-28-2012 03:02 AM
Super User
Posts: 9,687

Proc report - print spaces when be

Add a style into it.

asis=on

Ksharp

View solution in original post


All Replies
SAS Super FREQ
Posts: 8,743

Proc report - print spaces when be

Hi:

  You did not say what your destination of interest was. LISTING? HTML? RTF? PDF? Techniques for "padding" will differ depending on the destination of interest and on your version of SAS.

cynthia

New Contributor
Posts: 2

Proc report - print spaces when be

Hi

The report will be produced in pdf with the following code:

options nodate nonumber linesize=200 pagesize=70 leftmargin=.5in rightmargin=.5in topmargin=.5in bottommargin=.5in;

ods escapechar='^';
ods listing close;
ods pdf file="c:\temp\teste_factura.pdf";

title1 j=l '^S={preimage="G:\SVB\DCT\FACT_SVB\Factura via EMAIL\Aplicação\millen2.bmp"}                                 ORIGINAL';

footnote h=6pt f="Arial" j=l "Processado por computador";
ods pdf StartPage=Never;
ods noproctitle;

proc report data=facturas2(where=(comp='011') drop=cod_linha) nowindows COLWIDTH=131 missing
style(report)=[rules=none frame=void fontsize=8pt outputwidth=100%]
style(lines)=[font=("Courier New", 8pt)];
column linha1;
define linha1 / display "" width=124 format=$124. style=[font=("Courier New", 7pt) font_weight=bold  cellheight=1pt];
quit;

ods _all_ close;

Thanks

Solution
‎02-28-2012 03:02 AM
Super User
Posts: 9,687

Proc report - print spaces when be

Add a style into it.

asis=on

Ksharp

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 217 views
  • 0 likes
  • 3 in conversation