<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Proc Report: relation between width (SAS output) and style(column) (ODSRTF) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Report-relation-between-width-SAS-output-and-style-column/m-p/54339#M1865</link>
    <description>Hi everybody,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to have a realistic representation of what I will find in the RTF document compared with the SAS output.&lt;BR /&gt;
&lt;BR /&gt;
For that, when I create a RTF file, I use Courier New 8pt. This font should be the same that we have in the SAS output.&lt;BR /&gt;
&lt;BR /&gt;
The first problem is how to set the column width using proc report. &lt;BR /&gt;
&lt;BR /&gt;
For the SAS output it can be set using option "width". This option sets the number of characters to be used. So if I want to write Peter, I will have enough doing width=5.&lt;BR /&gt;
&lt;BR /&gt;
This option does not work in ods rtf, so we need the option&lt;BR /&gt;
style(column)=[cellwidth=xx units]&lt;BR /&gt;
 &lt;BR /&gt;
The problem is that I am not able to relate the number of character in the option width with the number of unit in rtf.&lt;BR /&gt;
&lt;BR /&gt;
I am trying to do this kind of reasoning:&lt;BR /&gt;
&lt;BR /&gt;
- One character takes 8 points,&lt;BR /&gt;
- 72 pt correspond to 1 inch,&lt;BR /&gt;
- so 1 character takes 8/72 inch,&lt;BR /&gt;
- so n characters takes n* 8/72 inch.&lt;BR /&gt;
&lt;BR /&gt;
But it does not work.&lt;BR /&gt;
&lt;BR /&gt;
I am using the following code:&lt;BR /&gt;
&lt;BR /&gt;
%let width = 10;&lt;BR /&gt;
&lt;BR /&gt;
ods rtf file="c:\temp\format.rtf";&lt;BR /&gt;
proc report missing headline headskip nowd data=sashelp.class split='*';&lt;BR /&gt;
columns name;&lt;BR /&gt;
define name / display    'Name' style(column)=[cellwidth=%sysevalf(8/72 * &amp;amp;width)in] width=&amp;amp;width;&lt;BR /&gt;
run;&lt;BR /&gt;
ods rtf close;&lt;BR /&gt;
&lt;BR /&gt;
Any idea??&lt;BR /&gt;
&lt;BR /&gt;
Thanks!!&lt;BR /&gt;
Juanvte</description>
    <pubDate>Tue, 09 Feb 2010 11:27:48 GMT</pubDate>
    <dc:creator>JuanVte</dc:creator>
    <dc:date>2010-02-09T11:27:48Z</dc:date>
    <item>
      <title>Proc Report: relation between width (SAS output) and style(column) (ODSRTF)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Report-relation-between-width-SAS-output-and-style-column/m-p/54339#M1865</link>
      <description>Hi everybody,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to have a realistic representation of what I will find in the RTF document compared with the SAS output.&lt;BR /&gt;
&lt;BR /&gt;
For that, when I create a RTF file, I use Courier New 8pt. This font should be the same that we have in the SAS output.&lt;BR /&gt;
&lt;BR /&gt;
The first problem is how to set the column width using proc report. &lt;BR /&gt;
&lt;BR /&gt;
For the SAS output it can be set using option "width". This option sets the number of characters to be used. So if I want to write Peter, I will have enough doing width=5.&lt;BR /&gt;
&lt;BR /&gt;
This option does not work in ods rtf, so we need the option&lt;BR /&gt;
style(column)=[cellwidth=xx units]&lt;BR /&gt;
 &lt;BR /&gt;
The problem is that I am not able to relate the number of character in the option width with the number of unit in rtf.&lt;BR /&gt;
&lt;BR /&gt;
I am trying to do this kind of reasoning:&lt;BR /&gt;
&lt;BR /&gt;
- One character takes 8 points,&lt;BR /&gt;
- 72 pt correspond to 1 inch,&lt;BR /&gt;
- so 1 character takes 8/72 inch,&lt;BR /&gt;
- so n characters takes n* 8/72 inch.&lt;BR /&gt;
&lt;BR /&gt;
But it does not work.&lt;BR /&gt;
&lt;BR /&gt;
I am using the following code:&lt;BR /&gt;
&lt;BR /&gt;
%let width = 10;&lt;BR /&gt;
&lt;BR /&gt;
ods rtf file="c:\temp\format.rtf";&lt;BR /&gt;
proc report missing headline headskip nowd data=sashelp.class split='*';&lt;BR /&gt;
columns name;&lt;BR /&gt;
define name / display    'Name' style(column)=[cellwidth=%sysevalf(8/72 * &amp;amp;width)in] width=&amp;amp;width;&lt;BR /&gt;
run;&lt;BR /&gt;
ods rtf close;&lt;BR /&gt;
&lt;BR /&gt;
Any idea??&lt;BR /&gt;
&lt;BR /&gt;
Thanks!!&lt;BR /&gt;
Juanvte</description>
      <pubDate>Tue, 09 Feb 2010 11:27:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Report-relation-between-width-SAS-output-and-style-column/m-p/54339#M1865</guid>
      <dc:creator>JuanVte</dc:creator>
      <dc:date>2010-02-09T11:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report: relation between width (SAS output) and style(column) (ODSRTF)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Report-relation-between-width-SAS-output-and-style-column/m-p/54340#M1866</link>
      <description>Sorry, now I see that this post it is not in the correct place... I am going to move it.</description>
      <pubDate>Tue, 09 Feb 2010 13:50:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Report-relation-between-width-SAS-output-and-style-column/m-p/54340#M1866</guid>
      <dc:creator>JuanVte</dc:creator>
      <dc:date>2010-02-09T13:50:50Z</dc:date>
    </item>
  </channel>
</rss>

