<?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 Re: Text wrapping behaves differently between ODS PDF and RTF using SPANROWS in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Text-wrapping-behaves-differently-between-ODS-PDF-and-RTF-using/m-p/57426#M6915</link>
    <description>Hi:&lt;BR /&gt;
  I never noticed that behavior of PDF with SPANROWS, but you're right, PDF resizes the first cell in the spanned rows to fit the whole text.&lt;BR /&gt;
 &lt;BR /&gt;
  I don't know exactly whether this is the recommended method, but this worked for me (see #3 below).&lt;BR /&gt;
&lt;BR /&gt;
  Otherwise, if this method doesn't work for you or you prefer to find another method, you might want to work with Tech Support on this issue.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
data class;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  where age ge 14;&lt;BR /&gt;
  length grpline $100;&lt;BR /&gt;
  grpline = sex||' ~ Twas brillig and the slithy toves '||&lt;BR /&gt;
         'Did gyre and gimble in the  wabe.';&lt;BR /&gt;
run;&lt;BR /&gt;
                      &lt;BR /&gt;
** 1) take all defaults with spanrows;&lt;BR /&gt;
ods rtf file='c:\temp\testspan1.rtf';&lt;BR /&gt;
ods pdf file='c:\temp\testspan1.pdf';&lt;BR /&gt;
                &lt;BR /&gt;
proc report data=class nowd spanrows;&lt;BR /&gt;
  title '1) do not control cell width';&lt;BR /&gt;
  column grpline name age height;&lt;BR /&gt;
  define grpline / group;&lt;BR /&gt;
  define name / order;&lt;BR /&gt;
  define age / display;&lt;BR /&gt;
  define height / display;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close; &lt;BR /&gt;
                     &lt;BR /&gt;
** 2) use CELLWIDTH to see wrapping differences;&lt;BR /&gt;
ods rtf file='c:\temp\testspan2.rtf';&lt;BR /&gt;
ods pdf file='c:\temp\testspan2.pdf';&lt;BR /&gt;
             &lt;BR /&gt;
proc report data=class nowd spanrows;&lt;BR /&gt;
  title '2) use cell width control';&lt;BR /&gt;
  column grpline name age height;&lt;BR /&gt;
  define grpline / group style(column)={cellwidth=2in};&lt;BR /&gt;
  define name / order;&lt;BR /&gt;
  define age / display;&lt;BR /&gt;
  define height / display;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
                    &lt;BR /&gt;
** 3) use CELLHEIGHT with ODS PDF;&lt;BR /&gt;
ods pdf file='c:\temp\testspan3.pdf';&lt;BR /&gt;
             &lt;BR /&gt;
proc report data=class nowd spanrows&lt;BR /&gt;
  style(column)={cellheight=14pt};&lt;BR /&gt;
  title '3) use cell width control with PDF';&lt;BR /&gt;
  column grpline name age height;&lt;BR /&gt;
  define grpline / group style(column)={cellwidth=2in cellheight=14pt};&lt;BR /&gt;
  define name / order;&lt;BR /&gt;
  define age / display;&lt;BR /&gt;
  define height / display;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Thu, 29 Jul 2010 16:09:34 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2010-07-29T16:09:34Z</dc:date>
    <item>
      <title>Text wrapping behaves differently between ODS PDF and RTF using SPANROWS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Text-wrapping-behaves-differently-between-ODS-PDF-and-RTF-using/m-p/57425#M6914</link>
      <description>hi,&lt;BR /&gt;
I am using PROC REPORT with ODS to produce tables in pdf and rtf format. SPANROWS OPTION is used to combine cells with the same value of group variable. This help produce a nice table. However, if column width is fixed and the character string as the value of group variable is too long, the string will be wrapped into several lines. For output tables in rtf, the result looks something like this, &lt;BR /&gt;
col1.........col2.......col3&lt;BR /&gt;
this is......12.0.......22&lt;BR /&gt;
a long......34.0.......33&lt;BR /&gt;
string...... 56.0.......44&lt;BR /&gt;
&lt;BR /&gt;
which is fine. However, for output tables in pdf, the result does not looks so good:&lt;BR /&gt;
col1.........col2......col3&lt;BR /&gt;
this is......12.0......22&lt;BR /&gt;
a long&lt;BR /&gt;
string     &lt;BR /&gt;
...............34.0......33&lt;BR /&gt;
...............56.0......44&lt;BR /&gt;
which has some blank spaces in col2 and col3. &lt;BR /&gt;
&lt;BR /&gt;
Anyone know how to avoid such blank spaces in pdf, please advise. Thanks.</description>
      <pubDate>Thu, 29 Jul 2010 13:57:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Text-wrapping-behaves-differently-between-ODS-PDF-and-RTF-using/m-p/57425#M6914</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-29T13:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Text wrapping behaves differently between ODS PDF and RTF using SPANROWS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Text-wrapping-behaves-differently-between-ODS-PDF-and-RTF-using/m-p/57426#M6915</link>
      <description>Hi:&lt;BR /&gt;
  I never noticed that behavior of PDF with SPANROWS, but you're right, PDF resizes the first cell in the spanned rows to fit the whole text.&lt;BR /&gt;
 &lt;BR /&gt;
  I don't know exactly whether this is the recommended method, but this worked for me (see #3 below).&lt;BR /&gt;
&lt;BR /&gt;
  Otherwise, if this method doesn't work for you or you prefer to find another method, you might want to work with Tech Support on this issue.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
data class;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  where age ge 14;&lt;BR /&gt;
  length grpline $100;&lt;BR /&gt;
  grpline = sex||' ~ Twas brillig and the slithy toves '||&lt;BR /&gt;
         'Did gyre and gimble in the  wabe.';&lt;BR /&gt;
run;&lt;BR /&gt;
                      &lt;BR /&gt;
** 1) take all defaults with spanrows;&lt;BR /&gt;
ods rtf file='c:\temp\testspan1.rtf';&lt;BR /&gt;
ods pdf file='c:\temp\testspan1.pdf';&lt;BR /&gt;
                &lt;BR /&gt;
proc report data=class nowd spanrows;&lt;BR /&gt;
  title '1) do not control cell width';&lt;BR /&gt;
  column grpline name age height;&lt;BR /&gt;
  define grpline / group;&lt;BR /&gt;
  define name / order;&lt;BR /&gt;
  define age / display;&lt;BR /&gt;
  define height / display;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close; &lt;BR /&gt;
                     &lt;BR /&gt;
** 2) use CELLWIDTH to see wrapping differences;&lt;BR /&gt;
ods rtf file='c:\temp\testspan2.rtf';&lt;BR /&gt;
ods pdf file='c:\temp\testspan2.pdf';&lt;BR /&gt;
             &lt;BR /&gt;
proc report data=class nowd spanrows;&lt;BR /&gt;
  title '2) use cell width control';&lt;BR /&gt;
  column grpline name age height;&lt;BR /&gt;
  define grpline / group style(column)={cellwidth=2in};&lt;BR /&gt;
  define name / order;&lt;BR /&gt;
  define age / display;&lt;BR /&gt;
  define height / display;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
                    &lt;BR /&gt;
** 3) use CELLHEIGHT with ODS PDF;&lt;BR /&gt;
ods pdf file='c:\temp\testspan3.pdf';&lt;BR /&gt;
             &lt;BR /&gt;
proc report data=class nowd spanrows&lt;BR /&gt;
  style(column)={cellheight=14pt};&lt;BR /&gt;
  title '3) use cell width control with PDF';&lt;BR /&gt;
  column grpline name age height;&lt;BR /&gt;
  define grpline / group style(column)={cellwidth=2in cellheight=14pt};&lt;BR /&gt;
  define name / order;&lt;BR /&gt;
  define age / display;&lt;BR /&gt;
  define height / display;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 29 Jul 2010 16:09:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Text-wrapping-behaves-differently-between-ODS-PDF-and-RTF-using/m-p/57426#M6915</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-07-29T16:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Text wrapping behaves differently between ODS PDF and RTF using SPANROWS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Text-wrapping-behaves-differently-between-ODS-PDF-and-RTF-using/m-p/57427#M6916</link>
      <description>Thanks you very much, Cynthia. &lt;BR /&gt;
The mothod you suggested works in all cases except when the text string spans across too many lines and the number of corresponding rows in other columns is limited. In that case, the text string will be truncated.&lt;BR /&gt;
&lt;BR /&gt;
Anyway, this method is good enough for me. Thanks again.</description>
      <pubDate>Fri, 30 Jul 2010 02:40:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Text-wrapping-behaves-differently-between-ODS-PDF-and-RTF-using/m-p/57427#M6916</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-30T02:40:21Z</dc:date>
    </item>
  </channel>
</rss>

